/* *****************************************************

    ** Custom Stylesheet **

    Any custom styling you want to apply should be
    defined here.

***************************************************** */

/* =====================================================
   PASSWORD STRENGTH METER (shared)
   ===================================================== */
.register-password-strength {
    margin-top: 0.5rem;
}

.register-password-strength .progress {
    height: 6px;
    border-radius: 4px;
    background: #e2e8f0;
    overflow: hidden;
}

.register-password-strength .progress-bar {
    border-radius: 4px;
    transition: width 0.3s;
}

.register-password-strength #passwordStrengthTextLabel {
    font-size: 0.75rem;
    margin-top: 0.3rem;
    margin-bottom: 0;
    text-align: left;
}

/* =====================================================
   LEFT SIDEBAR NAVIGATION
   ===================================================== */

/* ── Body-level layout wrapper ── */
body.has-left-nav {
    overflow-x: hidden;
}

.ca-layout {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

/* ── Left nav panel (matches brand blue gradient) ── */
.ca-left-nav {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0b3d91 0%, #1e6bd6 55%, #0b3d91 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), width 0.28s cubic-bezier(0.4,0,0.2,1);
    scrollbar-width: none;
    box-shadow: 2px 0 14px rgba(11, 61, 145, 0.15);
}

.ca-left-nav::-webkit-scrollbar {
    display: none;
}

/* Grid texture identical to login/register right panel */
.ca-left-nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* ── Brand bar at top of nav ── */
.ca-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-decoration: none !important;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.ca-nav-brand img {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.ca-nav-logo-icon {
    display: none;
    filter: none;
    opacity: 1;
}

.ca-nav-brand .ca-nav-logo-icon {
    filter: none !important;
}

.ca-nav-brand-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
}

/* ── Nav section label ── */
.ca-nav-section {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3);
    padding: 1.25rem 1.25rem 0.4rem;
    position: relative;
    z-index: 1;
}

/* ── Nav items ── */
.ca-nav-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0.65rem;
    position: relative;
    z-index: 1;
}

.ca-nav-item {
    margin-bottom: 2px;
}

.ca-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.35;
}

.ca-nav-link:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
    text-decoration: none !important;
}

.ca-nav-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-weight: 600;
}

.ca-nav-link.active .ca-nav-icon {
    color: #93c5fd;
}

.ca-nav-icon {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
    transition: color 0.15s;
}

.ca-nav-link:hover .ca-nav-icon {
    color: rgba(255,255,255,0.7);
}

.ca-nav-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.75);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 20px;
    line-height: 1.4;
    flex-shrink: 0;
}

/* ── Divider ── */
.ca-nav-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin: 0.5rem 0.65rem;
}

/* ── Bottom user strip ── */
.ca-nav-footer {
    margin-top: auto;
    padding: 0.75rem 0.65rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
    z-index: 1;
}

.ca-nav-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
}

.ca-nav-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    flex-shrink: 0;
}

.ca-nav-user-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ca-nav-user-role {
    font-size: 0.66rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
}

/* ── Content area pushed right ── */
.ca-content-wrap {
    flex: 1 1 auto;
    margin-left: 240px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.28s;
}

/* ── Mobile toggle button ── */
.ca-nav-toggle {
    display: none !important;
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    top: auto;
    right: auto;
    z-index: 1060;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0f172a;
    border: 1.5px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    transition: background 0.15s;
}

.ca-nav-toggle:hover {
    background: #1e293b;
}

/* ── Overlay for mobile ── */
.ca-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1040;
    backdrop-filter: blur(2px);
}

/* ── Active state badge (pulsing dot) ── */
.ca-nav-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    margin-left: auto;
    flex-shrink: 0;
    animation: caNavDotPulse 2.5s ease-in-out infinite;
}

@keyframes caNavDotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .ca-left-nav {
        transform: translateX(-100%);
    }

    .ca-left-nav.open {
        transform: translateX(0);
    }

    .ca-left-nav::before {
        width: 240px;
    }

    .ca-content-wrap {
        margin-left: 0;
    }

    .ca-nav-toggle {
        display: flex !important;
        top: auto;
        right: auto;
    }

    .ca-nav-overlay.open {
        display: block;
    }
}

@media (min-width: 992px) {
    body.has-left-nav .ca-nav-toggle {
        display: none !important;
    }

    /* Shrink WHMCS existing right-side sidebar since left nav replaces it at wide viewports */
    .ca-content-wrap .col-lg-4 {
        display: none;
    }

    .ca-content-wrap .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ca-content-wrap .col-xl-3 {
        display: none;
    }

    .ca-content-wrap .col-xl-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Restore columns inside product details and domain details layouts */
    .ca-content-wrap .pm-product-layout > .col-lg-4,
    .ca-content-wrap .pm-product-layout > .col-xl-3,
    .ca-content-wrap .pm-domain-layout > .col-lg-4,
    .ca-content-wrap .pm-domain-layout > .col-xl-3,
    .ca-content-wrap .pm-security-layout .col-md-6,
    .ca-content-wrap .pm-security-layout .col-lg-4,
    .ca-content-wrap .pm-security-layout .col-xl-3 {
        display: block;
    }

    .ca-content-wrap .pm-product-layout > .col-lg-8,
    .ca-content-wrap .pm-domain-layout > .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .ca-content-wrap .pm-product-layout > .col-xl-9,
    .ca-content-wrap .pm-domain-layout > .col-xl-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }
}

/* ── Keep header + footer full-width ── */
.ca-content-wrap #header,
.ca-content-wrap #footer {
    width: 100%;
}

/* =====================================================
   CLIENT AREA LAYOUT ALIGNMENT FIXES
   ===================================================== */

/* Topbar must not sit behind the fixed sidebar */
body.has-left-nav > header#header.ca-slim-header {
    margin-left: 240px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Keep master breadcrumb aligned with content, not under sidebar */
body.has-left-nav > nav.master-breadcrumb,
body.has-left-nav > .network-issues-notifications {
    margin-left: 240px;
}

@media (max-width: 991px) {
    body.has-left-nav > header#header.ca-slim-header,
    body.has-left-nav > nav.master-breadcrumb,
    body.has-left-nav > .network-issues-notifications {
        margin-left: 0;
    }
}

/* Logo fit inside sidebar — no stretching / overflow */
.ca-nav-brand {
    overflow: hidden;
    padding: 1rem 1.25rem 0.9rem;
}

.ca-nav-brand img {
    max-width: 100%;
    max-height: 32px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Remove bottom user strip in sidebar */
.ca-nav-footer,
.ca-left-nav .ca-nav-footer,
.ca-left-nav .ca-nav-user,
.ca-left-nav hr.ca-nav-divider {
    display: none !important;
}

/* Give the sidebar breathing room at the bottom */
.ca-left-nav {
    padding-bottom: 1.25rem;
}

.ca-nav-list-top {
    margin-top: 0.5rem;
}

/* Section labels — tighter spacing now that user strip is gone */
.ca-nav-section {
    padding-top: 1rem;
}

.ca-nav-list-top + .ca-nav-section,
.ca-nav-brand + .ca-nav-list-top .ca-nav-item:first-child {
    padding-top: 0.5rem;
}

.ca-nav-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-nav-arrow {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
    transition: transform 0.15s;
}

.ca-nav-link:hover .ca-nav-arrow {
    transform: translateX(2px);
    color: rgba(255,255,255,0.7);
}

/* Ensure main content fills remaining width under the topbar */
.ca-content-wrap #main-body {
    width: 100%;
    padding-top: 1rem;
}

.ca-content-wrap #main-body > .container {
    max-width: none;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 1400px) {
    .ca-content-wrap #main-body > .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Hide the footer inside the client area (UI only — markup/logic kept) */
body.has-left-nav #footer {
    display: none !important;
}

/* =====================================================
   SIDEBAR COLLAPSE TOGGLE + BRAND POLISH
   ===================================================== */

/* Ensure sidebar is fixed so logo aligns with top of page */
.ca-left-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
}

/* Bottom bar — globe + collapse toggle on one line */
.ca-nav-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    z-index: 10;
}

.ca-nav-bottom-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    position: relative;
}

.ca-nav-bottom-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.ca-nav-bottom-btn:active {
    background: rgba(255,255,255,0.16);
}

.ca-nav-bottom-btn--collapse {
    margin-left: auto;
    border-left: 1px solid rgba(255,255,255,0.08);
}

.ca-sidebar-collapse-icon {
    font-size: 0.8rem;
    transition: transform 0.25s ease;
}

body.ca-sidebar-collapsed .ca-sidebar-collapse-icon {
    transform: rotate(180deg);
}

.ca-nav-lang {
    position: relative;
}

.ca-nav-lang-dropdown {
    display: none;
    position: absolute;
    left: 0;
    bottom: 100%;
    width: 190px;
    background: #1a3a6e;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 0.3rem;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
    margin-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.ca-nav-lang-dropdown::-webkit-scrollbar { width: 4px; }
.ca-nav-lang-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.ca-nav-lang.is-open .ca-nav-lang-dropdown {
    display: block;
}

.ca-nav-lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    text-decoration: none !important;
    transition: background 0.12s, color 0.12s;
}

.ca-nav-lang-option:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none !important;
}

.ca-nav-lang-option.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 600;
}

.ca-nav-lang-check {
    margin-left: auto;
    font-size: 0.65rem;
    color: #93c5fd;
}

.ca-nav-lang-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 991px) {
    .ca-nav-bottom-btn--collapse {
        display: none;
    }
    .ca-nav-bottom-bar {
        justify-content: flex-start;
    }
}

/* Brand refinements to match login/reset gradient */
.ca-nav-brand {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.ca-nav-brand-text {
    background: linear-gradient(135deg, #ffffff, #dbeafe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Active pill in blue-brand sidebar */
.ca-nav-link.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

.ca-nav-link.active .ca-nav-icon {
    color: #ffffff;
}

.ca-nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.ca-nav-section {
    color: rgba(255,255,255,0.55);
}

.ca-nav-link {
    color: rgba(255,255,255,0.82);
}

.ca-nav-icon {
    color: rgba(255,255,255,0.7);
}

.ca-nav-badge {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
}

/* ── Collapsible sidebar groups ── */
.ca-nav-group {
    display: block;
}

.ca-nav-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.85rem 1.25rem 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: color 0.15s;
}

.ca-nav-section-toggle:hover {
    color: rgba(255,255,255,0.85);
}

.ca-nav-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-align: left;
}

.ca-nav-section-caret {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.ca-nav-group.is-closed .ca-nav-section-caret {
    transform: rotate(-90deg);
}

.ca-nav-collapse {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    max-height: 2000px;
    opacity: 1;
}

.ca-nav-group.is-closed .ca-nav-collapse {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
}

/* ── Desktop collapsed state — flyout system ── */
@media (min-width: 992px) {

    /* --- Core dimensions --- */
    body.ca-sidebar-collapsed .ca-left-nav {
        width: 72px;
        overflow: visible;
        padding-bottom: 90px;
    }

    body.ca-sidebar-collapsed .ca-left-nav::before {
        width: 72px;
    }

    body.ca-sidebar-collapsed .ca-content-wrap {
        margin-left: 72px;
    }

    body.ca-sidebar-collapsed > header#header.ca-slim-header,
    body.ca-sidebar-collapsed > nav.master-breadcrumb,
    body.ca-sidebar-collapsed > .network-issues-notifications {
        margin-left: 72px;
    }

    /* --- Hide text, keep icons --- */
    body.ca-sidebar-collapsed .ca-nav-label,
    body.ca-sidebar-collapsed .ca-nav-badge,
    body.ca-sidebar-collapsed .ca-nav-brand-text,
    body.ca-sidebar-collapsed .ca-nav-status,
    body.ca-sidebar-collapsed .ca-nav-arrow {
        display: none !important;
    }

    /* --- Brand: swap full logo for icon when collapsed --- */
    body.ca-sidebar-collapsed .ca-nav-logo-full {
        display: none !important;
    }

    body.ca-sidebar-collapsed .ca-nav-logo-icon {
        display: block !important;
    }

    body.ca-sidebar-collapsed .ca-nav-brand {
        justify-content: center;
        padding: 0.75rem 0.5rem;
    }

    body.ca-sidebar-collapsed .ca-nav-brand .ca-nav-logo-icon,
    body.ca-sidebar-collapsed .ca-brand-logo-row .ca-nav-logo-icon {
        max-height: 36px;
        width: auto;
        filter: none !important;
    }

    body.ca-sidebar-collapsed .ca-nav-brand .ca-nav-logo-icon {
        border-radius: 0;
    }

    body.ca-sidebar-collapsed .ca-brand-logo-row .ca-nav-logo-icon {
        border-radius: 50%;
    }

    /* --- Nav lists tighten --- */
    body.ca-sidebar-collapsed .ca-nav-list {
        padding: 0.25rem 0.45rem;
    }

    /* --- Single nav links (Dashboard, Home, standalone items) --- */
    body.ca-sidebar-collapsed .ca-nav-link {
        justify-content: center;
        padding: 0.6rem 0.4rem;
        position: relative;
        overflow: visible;
    }

    body.ca-sidebar-collapsed .ca-nav-icon {
        font-size: 1rem;
        margin: 0;
    }

    /* Tooltip for standalone links on hover */
    body.ca-sidebar-collapsed .ca-nav-list-top .ca-nav-link:hover::after,
    body.ca-sidebar-collapsed .ca-nav-list:not(.ca-nav-collapse) .ca-nav-link:hover::after {
        content: attr(data-flyout-label);
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        background: #1e293b;
        color: #fff;
        font-size: 0.78rem;
        font-weight: 600;
        padding: 0.4rem 0.75rem;
        border-radius: 6px;
        white-space: nowrap;
        z-index: 9999;
        pointer-events: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }

    body.ca-sidebar-collapsed .ca-nav-list-top .ca-nav-link:hover::before,
    body.ca-sidebar-collapsed .ca-nav-list:not(.ca-nav-collapse) .ca-nav-link:hover::before {
        content: '';
        position: absolute;
        left: calc(100% + 6px);
        top: 50%;
        transform: translateY(-50%);
        border: 5px solid transparent;
        border-right-color: #1e293b;
        z-index: 9999;
        pointer-events: none;
    }

    /* --- Groups: hide section toggle, show flyout trigger icon --- */
    body.ca-sidebar-collapsed .ca-nav-section-toggle {
        display: none !important;
    }

    /* Hide ALL child items inside groups by default */
    body.ca-sidebar-collapsed .ca-nav-collapse {
        max-height: 0 !important;
        opacity: 0 !important;
        overflow: hidden;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* The flyout trigger icon injected by JS */
    body.ca-sidebar-collapsed .ca-flyout-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0.6rem 0;
        color: rgba(255,255,255,0.55);
        font-size: 1rem;
        cursor: pointer;
        border-radius: 8px;
        transition: background 0.15s, color 0.15s;
        position: relative;
        z-index: 1;
    }

    body.ca-sidebar-collapsed .ca-flyout-trigger:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }

    /* --- Flyout panel --- */
    body.ca-sidebar-collapsed .ca-flyout-panel {
        display: none;
        position: absolute;
        left: 72px;
        top: 0;
        min-width: 220px;
        max-width: 280px;
        background: #1a3a6e;
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 10px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.35);
        padding: 0.5rem 0;
        z-index: 9999;
        overflow: hidden;
    }

    body.ca-sidebar-collapsed .ca-flyout-panel.is-open {
        display: block;
    }

    body.ca-sidebar-collapsed .ca-flyout-header {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: rgba(255,255,255,0.4);
        padding: 0.6rem 1rem 0.35rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        margin-bottom: 0.25rem;
    }

    body.ca-sidebar-collapsed .ca-flyout-panel .ca-nav-collapse {
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible;
        padding: 0 !important;
        margin: 0 !important;
    }

    body.ca-sidebar-collapsed .ca-flyout-panel .ca-nav-list {
        padding: 0.25rem 0.5rem;
    }

    body.ca-sidebar-collapsed .ca-flyout-panel .ca-nav-link {
        justify-content: flex-start;
        padding: 0.5rem 0.75rem;
        gap: 0.6rem;
    }

    body.ca-sidebar-collapsed .ca-flyout-panel .ca-nav-label {
        display: inline !important;
    }

    body.ca-sidebar-collapsed .ca-flyout-panel .ca-nav-badge {
        display: inline-flex !important;
    }

    body.ca-sidebar-collapsed .ca-flyout-panel .ca-nav-icon {
        font-size: 0.8rem;
        margin: 0;
    }

    /* --- Guest auth CTA in collapsed --- */
    body.ca-sidebar-collapsed .ca-guest-auth-cta {
        padding: 0.5rem;
        gap: 0.35rem;
    }

    body.ca-sidebar-collapsed .ca-guest-auth-btn span {
        display: none;
    }

    body.ca-sidebar-collapsed .ca-guest-auth-btn {
        padding: 0.55rem;
        justify-content: center;
    }

    body.ca-sidebar-collapsed .ca-guest-auth-btn i {
        font-size: 1rem;
    }

    /* --- Bottom bar in collapsed: stack language + toggle vertically --- */
    body.ca-sidebar-collapsed .ca-nav-bottom-bar {
        flex-direction: column;
        height: auto;
        padding: 0.25rem 0;
    }

    body.ca-sidebar-collapsed .ca-nav-lang {
        display: block;
        width: 100%;
    }

    body.ca-sidebar-collapsed .ca-nav-lang .ca-nav-bottom-btn {
        width: 100%;
    }

    body.ca-sidebar-collapsed .ca-nav-lang-dropdown {
        left: 100%;
        bottom: 0;
        top: auto;
        margin-bottom: 0;
        margin-left: 6px;
        width: 190px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    }

    body.ca-sidebar-collapsed .ca-nav-bottom-btn--collapse {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.08);
        margin-left: 0;
        width: 100%;
    }
}


/* =====================================================
   SLIM TOPBAR (logged-in header replacement)
   ===================================================== */

/* Make the header slim when logged in */
header.ca-slim-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.ca-topbar {
    height: 56px;
    display: flex;
    align-items: center;
}

.ca-topbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
    max-width: 1680px;
    margin: 0 auto;
}

/* ── KB Search ── */
.ca-topbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    flex: 0 1 320px;
    margin-right: auto;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ca-topbar-search:focus-within {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156,163,175,0.15);
    background: #fff;
}

.ca-topbar-search-icon {
    color: #9ca3af;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.ca-topbar-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.8rem;
    color: #374151;
    width: 100%;
    padding: 0;
}

.ca-topbar-search-input::placeholder {
    color: #9ca3af;
}

/* ── Right side ── */
.ca-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* ── Status pills ── */
.ca-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
    line-height: 1;
}

.ca-pill:hover {
    opacity: 0.82;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.ca-pill i {
    font-size: 0.78rem;
}

.ca-pill-warn {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.ca-pill-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.ca-pill-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.ca-pill-soon {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.ca-pill-label {
    font-weight: 500;
    opacity: 0.9;
}

.ca-pill-count {
    font-weight: 700;
    background: rgba(255,255,255,0.55);
    color: inherit;
    border-radius: 10px;
    padding: 0.05rem 0.42rem;
    font-size: 0.78rem;
    line-height: 1.3;
    min-width: 18px;
    text-align: center;
}

.ca-pill-credit {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    cursor: default;
}

.ca-pill-addcredit {
    background: #1e6bd6;
    color: #ffffff !important;
    border: 1px solid #1e6bd6;
    box-shadow: 0 2px 6px rgba(30, 107, 214, 0.22);
}

.ca-pill-addcredit:hover {
    background: #0b3d91;
    border-color: #0b3d91;
    color: #ffffff !important;
    transform: translateY(-1px);
    opacity: 1;
}

.ca-pill-addcredit i {
    color: #ffffff;
}

.ca-topbar-btn-support {
    width: auto !important;
    padding: 0 0.85rem !important;
    gap: 0.4rem;
    color: #1e40af !important;
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
}

.ca-topbar-btn-support:hover {
    background: #dbeafe !important;
    color: #1e3a8a !important;
    border-color: #93c5fd !important;
}

.ca-topbar-btn-label {
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Icon buttons ── */
.ca-topbar-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: transparent;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none !important;
    flex-shrink: 0;
    padding: 0;
}

.ca-topbar-btn:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: #d1d5db;
    text-decoration: none !important;
}

/* ── Notification dot/badge ── */
.ca-notif-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid #fff;
    line-height: 1;
}

.ca-topbar-notif-wrap {
    position: relative;
}

/* ── Profile button ── */
.ca-profile-wrap {
    position: relative;
    margin-left: 0.25rem;
}

.ca-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.65rem 0.3rem 0.35rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: 0.8rem;
    color: #374151;
    font-weight: 500;
}

.ca-profile-btn:hover,
.ca-profile-btn[aria-expanded="true"] {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.ca-profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.ca-profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
}

.ca-profile-caret {
    font-size: 0.6rem;
    color: #9ca3af;
}

/* ── Profile dropdown ── */
.ca-profile-dropdown {
    min-width: 220px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 0.25rem 0;
    margin-top: 4px;
}

.ca-profile-dropdown-header {
    padding: 0.75rem 1rem 0.6rem;
}

.ca-profile-dropdown-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ca-profile-dropdown-email {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.ca-profile-dropdown .dropdown-item {
    font-size: 0.8rem;
    color: #374151;
    padding: 0.45rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ca-profile-dropdown .dropdown-item i {
    width: 14px;
    text-align: center;
    color: #9ca3af;
}

.ca-profile-dropdown .dropdown-item:hover {
    background: #f9fafb;
    color: #111827;
}

.ca-profile-dropdown .dropdown-item:hover i {
    color: #374151;
}

.ca-profile-dropdown .dropdown-item.text-danger {
    color: #ef4444 !important;
}

.ca-profile-dropdown .dropdown-item.text-danger i {
    color: #ef4444;
}

.ca-profile-dropdown .dropdown-item.text-warning {
    color: #d97706 !important;
}

.ca-profile-dropdown .dropdown-item.text-warning i {
    color: #d97706;
}

/* ── Responsive: hide search on mobile ── */
@media (max-width: 575px) {
    .ca-topbar-search {
        display: none;
    }

    .ca-pill span {
        display: none;
    }

    .ca-pill {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        border-radius: 8px;
    }
}

/* Custom CSS for Nexus Cart
 *
 * This block allows you to customize theme colors and styles for the entire Nexus Cart template.
 *
 * To customize colors:
 * - Replace the var() references with your own hex colors or other CSS values.
 * - For example, instead of --primary: #4b5563; use --primary: #your-color;
 * - You can also override any CSS properties here.
 */

html {
    font-size: 14px;
}

:root {
    --white: #fff;

    /* Neutral shades */
    --neutral-50: #fbf9fa;
    --neutral-100: #f4f5f7;
    --neutral-200: #e4e4e7;
    --neutral-300: #d0d5dd;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --neutral-950: #030712;

    /* Neutral shades */
    /* define own pallet with brand colors */
    --primary-50: var(--neutral-50);
    --primary-100: var(--neutral-100);
    --primary-200: var(--neutral-200);
    --primary-300: var(--neutral-300);
    --primary-400: var(--neutral-400);
    --primary-500: var(--neutral-500);
    --primary-600: var(--neutral-600);
    --primary-700: var(--neutral-700);
    --primary-800: var(--neutral-800);
    --primary-900: var(--neutral-900);
    --primary-950: var(--neutral-900);

    /* Primary colors */
    /* Use shades from comments if `primary` colors use other colors, then neutral */
    --primary: var(--neutral-900);          /* var(--primary-600) */
    --primary-lifted: var(--neutral-800);   /* var(--primary-700) */
    --primary-accented: var(--neutral-700); /* var(--primary-800) */

    /* Secondary colors */
    --secondary: var(--neutral-500);
    --secondary-lifted: var(--neutral-600);
    --secondary-accented: var(--neutral-700);

    /* Success colors */
    --success: #00a63e;
    --success-lifted: #008236;
    --success-accented: #016630;

    /* Info colors */
    --info: #155dfc;
    --info-lifted: #1447e6;
    --info-accented: #193cb8;

    /* Notice colors */
    --notice: #7f22fe;
    --notice-lifted: #7008e7;
    --notice-accented: #5d0ec0;

    /* Warning colors */
    --warning: #f54a00;
    --warning-lifted: #ca3500;
    --warning-accented: #9f2d00;

    /* Error colors */
    --error: #e7000b;
    --error-lifted: #c10007;
    --error-accented: #9f0712;

    /* Grayscale colors */
    --grayscale: var(--neutral-900);
    --grayscale-lifted: var(--neutral-800);
    --grayscale-accented: var(--neutral-700);

    /* Neutral colors */
    --neutral: var(--neutral-500);
    --neutral-lifted: var(--neutral-600);
    --neutral-accented: var(--neutral-700);

    /* Text neutral colors */
    --text-inverted: var(--white);
    --text-muted: var(--neutral-400);
    --text-lifted: var(--neutral-500);
    --text-accented: var(--neutral-600);
    --text: var(--neutral-900);

    /* Border neutral colors */
    --border-muted: var(--neutral-200);
    --border: var(--neutral-300);
    --border-lifted: var(--neutral-400);
    --border-accented: var(--neutral-600);

    /* Background neutral colors */
    --bg: var(--white);
    --bg-muted: var(--neutral-50);
    --bg-lifted: var(--neutral-100);
    --bg-accented: var(--neutral-200);
    --bg-inverted: var(--neutral-900);

    /* Additional colors */
    --yellow-200: #fff085;
    --yellow-300: #ffdf20;
    --teal-300: #46edd5;
    --teal-400: #00d5be;
    --emerald-300: #5ee9b5;
    --pink-400: #fb64b6;

    /* Additional custom properties */
    /* Font sizes */
    --text-xs: 0.625rem;
    --text-sm: 0.75rem;
    --text-md: 0.875rem;
    --text-lg: 1rem;

    /* Spacing */
    --outline-sm: 1px;
    --outline-md: 2px;
    --outline-lg: 3px;

    /* Rounding */
    --rounding-sm: 0.25rem;
    --rounding-md: 0.5rem;
    --rounding-lg: 0.75rem;

    /* Other */
    --letter-spacing: 0em;
    --disabled-opacity: 25%;
}

/* =====================================================
   SUPPORT TICKET — DEPARTMENT CARD SELECTION
   ===================================================== */

.ca-dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 575px) {
    .ca-dept-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ca-dept-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.25rem 1.25rem 1rem;
    border: 1px solid var(--ui-border, #e5e9f0);
    border-radius: var(--ui-radius, 10px);
    background: #ffffff;
    text-decoration: none !important;
    color: var(--ui-text, #1f2937);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.1s ease;
    box-shadow: var(--ui-shadow-sm, 0 1px 3px rgba(15,23,42,0.06));
    position: relative;
}

.ca-dept-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ca-dept-card:hover {
    border-color: #1e6bd6;
    box-shadow: 0 4px 14px rgba(30, 107, 214, 0.12);
    background: #f0f7ff;
    transform: translateY(-2px);
    color: var(--ui-text, #1f2937);
    text-decoration: none !important;
}

.ca-dept-card:active {
    transform: translateY(0);
}

.ca-dept-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #dbeafe;
    color: #1e6bd6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: background 0.15s, color 0.15s;
}

.ca-dept-card:hover .ca-dept-card-icon {
    background: #1e6bd6;
    color: #ffffff;
}

.ca-dept-card-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: #1e3a5f;
    line-height: 1.3;
}

.ca-dept-card:hover .ca-dept-card-title {
    color: #1e6bd6;
}

.ca-dept-card-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    padding-left: 0;
}

.ca-dept-card-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #cbd5e1;
    font-size: 0.75rem;
    transition: color 0.15s, transform 0.15s;
}

.ca-dept-card:hover .ca-dept-card-arrow {
    color: #1e6bd6;
    transform: translateX(2px);
}

/* =====================================================
   PHONE INPUT (intl-tel-input)
   ===================================================== */

/*
 * Keep phone text clear of the flag + dial code block.
 * This protects layouts where iti-sdc-* width classes are not applied.
 */
.intl-tel-input.separate-dial-code input.form-control,
.intl-tel-input.separate-dial-code input[type="tel"] {
    padding-left: 92px !important;
}

/* =====================================================
   AUTH INPUT FIELDS (login, register, password reset)
   Consistent icon alignment inside input groups
   ===================================================== */

/* Base input sizing for consistency */
.input-group-merge .form-control,
.input-group .form-control,
form .form-control {
    height: 44px;
    border-radius: 8px;
    font-size: 0.9rem;
    border-color: #e5e7eb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-group-merge .form-control:focus,
.input-group .form-control:focus,
form .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Input group merge: icons inline with input, shared border */
.input-group-merge {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    flex-wrap: nowrap;
}

.input-group-merge .input-group-prepend,
.input-group-merge .input-group-append {
    display: flex;
    align-items: stretch;
    margin: 0;
}

.input-group-merge .input-group-prepend .input-group-text,
.input-group-merge .input-group-append .input-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 44px;
    padding: 0 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1;
    border-radius: 8px;
}

/* Prepend: icon on left, flat right border, input flat left border */
.input-group-merge .input-group-prepend .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group-merge .input-group-prepend + .form-control,
.input-group-merge > .input-group-prepend ~ .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
    flex: 1 1 auto;
    min-width: 0;
}

/* Append: icon on right, flat left border */
.input-group-merge .input-group-append .input-group-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}

.input-group-merge .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

/* Keep focused border color on adjacent icons */
.input-group-merge:focus-within .input-group-text {
    border-color: #3b82f6;
    background: #fff;
    color: #3b82f6;
}

/* Password toggle button inside append */
.input-group-merge .input-group-append .btn,
.input-group-merge .input-group-append button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 44px;
    padding: 0 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    color: #6b7280;
    box-shadow: none;
}

.input-group-merge .input-group-append .btn:hover,
.input-group-merge .input-group-append button:hover {
    color: #111827;
    background: #f3f4f6;
}

.input-group-merge:focus-within .input-group-append .btn,
.input-group-merge:focus-within .input-group-append button {
    border-color: #3b82f6;
}

/* Icon sizing inside input groups */
.input-group-merge .input-group-text i,
.input-group-merge .input-group-append .btn i,
.input-group-merge .input-group-append button i {
    font-size: 0.85rem;
    line-height: 1;
    vertical-align: middle;
}

/* =====================================================
   PHONE INPUT FIELD (intl-tel-input)
   Fix overlap between flag, country code, and input text
   ===================================================== */

.intl-tel-input {
    width: 100%;
    display: block;
    position: relative;
}

.intl-tel-input .flag-container {
    display: flex;
    align-items: center;
}

/* Keep flag + dial code block vertically centered and sized to input */
.intl-tel-input.separate-dial-code .selected-flag {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 8px 0 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    box-sizing: border-box;
}

.intl-tel-input.separate-dial-code .selected-dial-code {
    margin-left: 6px;
    font-size: 0.85rem;
    color: #374151;
    line-height: 1;
}

.intl-tel-input.separate-dial-code .iti-flag {
    flex-shrink: 0;
}

/* Ensure tel input text starts after prefix with clean spacing */
.intl-tel-input.separate-dial-code input.form-control,
.intl-tel-input.separate-dial-code input[type="tel"] {
    padding-left: 92px !important;
    height: 44px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    width: 100%;
}

.intl-tel-input.separate-dial-code input.form-control:focus,
.intl-tel-input.separate-dial-code input[type="tel"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.intl-tel-input.separate-dial-code:focus-within .selected-flag {
    border-color: #3b82f6;
    background: #fff;
}

/* Prevent flag container overlapping the input text */
.intl-tel-input .flag-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    padding: 0;
    z-index: 2;
}

/* Dropdown arrow alignment */
.intl-tel-input .selected-flag .iti-arrow {
    margin-left: 6px;
    position: static;
    display: inline-block;
    vertical-align: middle;
}

/* =====================================================
   SUPPORT TICKETS — CREATE TICKET BUTTON
   ===================================================== */
.ca-tickets-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 1rem 0;
}

.ca-create-ticket-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e6bd6 0%, #2563eb 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(30, 107, 214, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-decoration: none;
}

.ca-create-ticket-btn:hover,
.ca-create-ticket-btn:focus {
    background: linear-gradient(135deg, #1a5fc0 0%, #1e56d6 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 107, 214, 0.35);
    transform: translateY(-1px);
    text-decoration: none;
}

.ca-create-ticket-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(30, 107, 214, 0.25);
}

.ca-create-ticket-btn i {
    font-size: 1rem;
}

/* =====================================================
   MODERN UI POLISH (non-structural)
   Applies subtle rounded corners, soft shadows, refined
   typography and pill badges while keeping WHMCS layout.
   ===================================================== */

:root {
    --ui-radius: 10px;
    --ui-radius-sm: 8px;
    --ui-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --ui-shadow-md: 0 2px 4px rgba(15, 23, 42, 0.05), 0 4px 10px rgba(15, 23, 42, 0.06);
    --ui-border: #e5e9f0;
    --ui-surface: #ffffff;
    --ui-text: #1f2937;
    --ui-muted: #64748b;
    --ui-primary: #1e6bd6;
}

body { letter-spacing: -0.005em; }
body, .primary-content, #main-body { color: var(--ui-text); }

/* Cards / Panels */
.card,
.panel,
.well,
.ca-panel,
.sidebar .panel {
    border-radius: var(--ui-radius) !important;
    border: 1px solid var(--ui-border) !important;
    box-shadow: var(--ui-shadow-sm) !important;
    background: var(--ui-surface);
}
.card .card-header,
.panel .panel-heading {
    border-top-left-radius: var(--ui-radius) !important;
    border-top-right-radius: var(--ui-radius) !important;
    background: #f8fafc;
    border-bottom: 1px solid var(--ui-border);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.card .card-footer,
.panel .panel-footer {
    border-bottom-left-radius: var(--ui-radius) !important;
    border-bottom-right-radius: var(--ui-radius) !important;
    background: #f8fafc;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
}
p, li, td { line-height: 1.55; }

/* Buttons — consistent, slightly rounded, better padding */
.btn {
    border-radius: var(--ui-radius-sm) !important;
    padding: 0.5rem 1rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-sm { padding: 0.35rem 0.75rem; border-radius: 6px !important; }
.btn-lg { padding: 0.7rem 1.25rem; border-radius: var(--ui-radius) !important; }
.btn:hover { box-shadow: var(--ui-shadow-sm); }
.btn-primary { background-color: var(--ui-primary); border-color: var(--ui-primary); }
.btn-primary:hover, .btn-primary:focus { background-color: #1a5fc0; border-color: #1a5fc0; }

/* Form inputs */
.form-control,
.custom-select,
.input-group-text {
    border-radius: var(--ui-radius-sm) !important;
    border-color: var(--ui-border);
}
.form-control:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.12);
}

/* Badges — modern pill style */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3em 0.7em;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    border-radius: 999px !important;
    line-height: 1;
}
.label, .status {
    display: inline-flex;
    align-items: center;
    padding: 0.3em 0.7em;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 999px !important;
}
/* Softer semantic badge colors */
.badge-success, .label-success, .status.status-active,
.badge.active, .label.active {
    background: #e6f6ec !important;
    color: #1f7a3c !important;
}
.badge-warning, .label-warning, .status.status-pending {
    background: #fff4e0 !important;
    color: #9a5b00 !important;
}
.badge-danger, .label-danger,
.status.status-suspended, .status.status-terminated,
.status.status-cancelled, .status.status-overdue {
    background: #fdecec !important;
    color: #b42318 !important;
}
.badge-info, .label-info {
    background: #e5f0ff !important;
    color: #1e56d6 !important;
}
.badge-secondary, .label-default, .status.status-inactive {
    background: #eef1f6 !important;
    color: #475569 !important;
}

.tld-filters {
    margin: 0 0 25px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tld-filters .badge {
    display: inline-block;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--ui-radius-sm) !important;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.tld-filters .badge.badge-secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
}
.tld-filters .badge.badge-secondary:hover {
    background: #e2e8f0 !important;
    color: #334155 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.tld-filters .badge.badge-success {
    background: var(--ui-primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--ui-primary);
    box-shadow: 0 1px 3px rgba(30, 107, 214, 0.2);
}

.domain-pricing .table {
    margin-top: 0;
}

/* Tables */
.table { border-radius: var(--ui-radius); overflow: hidden; }
.table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--ui-border) !important;
    font-weight: 600;
    text-transform: none;
    color: #334155;
    letter-spacing: -0.005em;
}
.table td, .table th { vertical-align: middle; }

/* Alerts */
.alert {
    border-radius: var(--ui-radius) !important;
    border: 1px solid transparent;
    box-shadow: var(--ui-shadow-sm);
}

/* Modals */
.modal-content {
    border-radius: var(--ui-radius) !important;
    border: 1px solid var(--ui-border);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

/* Dropdown menus */
.dropdown-menu {
    border-radius: var(--ui-radius) !important;
    border: 1px solid var(--ui-border);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    padding: 0.35rem;
}
.dropdown-item { border-radius: 6px; padding: 0.45rem 0.65rem; }
.dropdown-item:hover, .dropdown-item:focus { background: #f1f5f9; }

/* Topbar stat pills (replaces search bar) */
.ca-topbar-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}
.ca-pill-stat {
    background: #f1f5f9 !important;
    color: #1f2937 !important;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}
.ca-pill-stat:hover { background: #e8eef7 !important; color: #0b3d91 !important; text-decoration: none; }
.ca-pill-stat .ca-pill-count {
    background: #1e6bd6;
    color: #fff;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}
.ca-pill-stat-domains .ca-pill-count { background: #0ea371; }

/* Support button count badge — always visible */
.ca-topbar-btn-support { position: relative; }
.ca-topbar-btn-support .ca-support-count {
    background: #ef4444;
    color: #fff;
}

.ca-support-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(30, 64, 175, 0.15);
    color: #1e40af;
    line-height: 1;
}

.ca-support-badge-active {
    background: #ef4444;
    color: #fff;
}

.ca-topbar-btn-support-active {
    color: #1e3a8a !important;
    border-color: #93c5fd !important;
    background: #dbeafe !important;
}

/* Expiring pill — amber/orange tone */
.ca-pill-expiring {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fb923c;
}

.ca-pill-expiring:hover {
    background: #ffedd5;
    color: #9a3412;
    text-decoration: none;
}

/* Credit balance amount */
.ca-pill-amount {
    font-weight: 700;
    font-size: 0.85rem;
    color: inherit;
}

.ca-pill-credit {
    cursor: pointer !important;
}

.ca-pill-credit:hover {
    background: #a7f3d0;
    color: #064e3b;
    text-decoration: none;
}

/* =====================================================
   MOBILE TOP BAR (pills + P logo + profile)
   ===================================================== */
.ca-mobile-topbar {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border-bottom: 1px solid var(--ui-border);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--ui-shadow-sm);
}
.ca-mobile-hamburger {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--ui-border);
    background: #f1f5f9;
    color: #334155;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s, color 0.15s;
}

.ca-mobile-hamburger:hover,
.ca-mobile-hamburger:active {
    background: #e2e8f0;
    color: #1e6bd6;
}

.ca-mobile-brand {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    overflow: hidden;
}

.ca-mobile-brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.ca-mobile-pills {
    display: flex;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.ca-mobile-pills::-webkit-scrollbar { display: none; }
.ca-mobile-pills .ca-pill {
    flex-shrink: 0;
    padding: 0.3rem 0.55rem;
    font-size: 0.85rem;
}
.ca-mobile-profile-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid var(--ui-border);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ca-mobile-profile-btn:hover { background: #e2e8f0; }

/* =====================================================
   MOBILE BOTTOM NAV BAR
   ===================================================== */
.ca-mobile-bottombar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: #ffffff;
    border-top: 1px solid var(--ui-border);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: stretch;
}
.ca-bb-item {
    flex: 1;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.35rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none !important;
    position: relative;
    border-radius: 8px;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.ca-bb-item i { font-size: 1.05rem; }
.ca-bb-item:hover { color: #1e6bd6; background: #f1f5f9; }
.ca-bb-item.active { color: #1e6bd6; }
.ca-bb-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 26px;
    height: 3px;
    background: #1e6bd6;
    border-radius: 0 0 3px 3px;
}
.ca-bb-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(20px);
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
    line-height: 1.3;
    min-width: 16px;
    text-align: center;
}

/* Bottom overflow sheet */
.ca-bb-sheet {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: none;
}
.ca-bb-sheet.open { display: block; }
.ca-bb-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}
.ca-bb-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.18);
    animation: caSheetUp 0.22s ease-out;
}
@keyframes caSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.ca-bb-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--ui-border);
    font-weight: 600;
    color: #1f2937;
}
.ca-bb-sheet-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}
.ca-bb-sheet-list {
    padding: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}
.ca-bb-sheet-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
    color: #1f2937 !important;
    background: #f8fafc;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    text-decoration: none !important;
    font-size: 0.88rem;
    font-weight: 500;
}
.ca-bb-sheet-link:hover { background: #eef2f8; }
.ca-bb-sheet-link i { color: #1e6bd6; width: 18px; text-align: center; }
.ca-bb-sheet-link.text-danger { color: #b42318 !important; }
.ca-bb-sheet-link.text-danger i { color: #b42318; }

/* =====================================================
   RESPONSIVE VISIBILITY
   ===================================================== */
@media (max-width: 767.98px) {
    .ca-topbar { display: none !important; }
    body.has-left-nav .ca-mobile-topbar { display: flex !important; }
    body.has-left-nav .ca-mobile-hamburger { display: inline-flex !important; }
    .ca-mobile-bottombar { display: flex; }
    .ca-content-wrap { padding-bottom: 72px; }
    .ca-nav-toggle { display: none !important; }
}

@media (min-width: 768px) {
    body.has-left-nav .ca-mobile-topbar,
    body.has-left-nav .ca-mobile-hamburger,
    body.has-left-nav .ca-mobile-brand,
    .ca-mobile-bottombar,
    .ca-bb-sheet { display: none !important; }
}

/* Hide pill labels on narrow tablet to keep layout tidy */
@media (max-width: 1199.98px) and (min-width: 768px) {
    .ca-pill-stat .ca-pill-label { display: none; }
}

/* =====================================================
   HIDE ACCOUNT BALANCE SIDE CARDS
   Covers WHMCS dynamic sidebar panels related to
   account/credit balance shown on client area pages.
   ===================================================== */
.card-sidebar[menuItemName="Account-Balance"],
.card-sidebar[menuItemName="AccountBalance"],
.card-sidebar[menuItemName="Billing-Balance"],
.card-sidebar[menuItemName="Client-Information"],
.card-sidebar[menuItemName="Client-Info"],
.card-sidebar[menuItemName="Billing-Info"],
.card-sidebar[menuItemName="Your-Info"],
.card-sidebar[menuItemName*="Balance"],
.card-sidebar[menuItemName*="balance"],
.card-sidebar[menuItemName*="Credit"],
.card-sidebar[menuItemName*="credit"] {
    display: none !important;
}

/* =====================================================
   NEWS TICKER (one-by-one slide)
   ===================================================== */
.ca-news-ticker {
    display: flex;
    align-items: center;
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
    border-bottom: 1px solid #bfdbfe;
    height: 34px;
    overflow: hidden;
}

.ca-news-ticker-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.85rem;
    background: #1e6bd6;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    height: 100%;
    flex-shrink: 0;
    white-space: nowrap;
}

.ca-news-ticker-label i {
    font-size: 0.65rem;
}

.ca-news-ticker-stage {
    flex: 1;
    min-width: 0;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.ca-news-ticker-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e40af;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.ca-news-ticker-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ca-news-ticker-slide.exit {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.ca-news-ticker-slide:hover {
    color: #0b3d91;
    text-decoration: underline !important;
}

.ca-news-ticker-all {
    flex-shrink: 0;
    padding: 0 0.85rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1e6bd6;
    text-decoration: none !important;
    white-space: nowrap;
    border-left: 1px solid #bfdbfe;
    height: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.15s, color 0.15s;
}

.ca-news-ticker-all:hover {
    background: #dbeafe;
    color: #0b3d91;
    text-decoration: none !important;
}

.ca-news-ticker-all i {
    font-size: 0.6rem;
}

@media (max-width: 575px) {
    .ca-news-ticker-label span { display: none; }
    .ca-news-ticker-label { padding: 0 0.6rem; }
    .ca-news-ticker-all { display: none; }
}

/* =====================================================
   DASHBOARD STAT TILES — mobile matches desktop (4 across)
   Services / Domains / Tickets / Invoices
   ===================================================== */
@media (max-width: 767.98px) {
    .tiles .row.no-gutters > [class*="col-"] {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .tiles .tile {
        padding: 0.75rem 0.4rem;
    }
    .tiles .tile .stat {
        font-size: 1.35rem;
    }
    .tiles .tile .title {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .tiles .tile i {
        font-size: 1.15rem;
    }
}

/* =====================================================
   SIDEBAR BRAND SECTION — Logo + Refer & Earn
   ===================================================== */

/* Outer wrapper — stacks logo row + flipcard vertically */
.ca-brand-wrap {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 1;
}

/* Logo row — same visual height as the topbar (56px) */
.ca-brand-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 1.25rem;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    transition: background 0.15s;
}

.ca-brand-logo-row:hover {
    background: rgba(255,255,255,0.04);
}

.ca-brand-logo-img {
    max-height: 32px;
    width: auto;
    max-width: 100%;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    object-fit: contain;
    display: block;
}

/* Refer & Earn row */
.ca-brand-refer-front {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    width: 100%;
    text-decoration: none !important;
    transition: background 0.15s;
}

.ca-brand-refer-front:hover {
    background: rgba(255,255,255,0.07);
    text-decoration: none !important;
}

.ca-brand-refer-icon {
    font-size: 1rem;
    color: #f59e0b;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.ca-brand-refer-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.ca-brand-refer-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
}

.ca-brand-refer-sub {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ca-brand-refer-arrow {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
    transition: transform 0.15s, color 0.15s;
}

.ca-brand-refer-front:hover .ca-brand-refer-arrow {
    transform: translateX(2px);
    color: rgba(255,255,255,0.7);
}

/* Hide on mobile */
@media (max-width: 991px) {
    .ca-brand-wrap,
    .ca-brand-refer-front {
        display: none;
    }
}

/* Collapsed sidebar adjustments */
body.ca-sidebar-collapsed .ca-brand-logo-row {
    padding: 0 0.5rem;
    justify-content: center;
}

body.ca-sidebar-collapsed .ca-brand-refer-front {
    display: none;
}

body.ca-sidebar-collapsed .ca-brand-logo-img.ca-nav-logo-full {
    display: none !important;
}

body.ca-sidebar-collapsed .ca-brand-logo-row .ca-nav-logo-icon {
    display: block !important;
    max-height: 36px;
    width: auto;
    border-radius: 50%;
    filter: none;
    opacity: 1;
}

/* =====================================================
   DOMAIN EXPIRY SUMMARY CARDS
   ===================================================== */

.domain-expiry-cards {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.expiry-card {
    flex: 1 1 0;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem 0.75rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
    text-align: center;
    outline: none;
}

.expiry-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.expiry-card__icon {
    font-size: 1.3rem;
    line-height: 1;
}

.expiry-card__count {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: #1a2233;
}

.expiry-card__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.expiry-card--all .expiry-card__icon { color: #0b3d91; }
.expiry-card--45 .expiry-card__icon { color: #2563eb; }
.expiry-card--30 .expiry-card__icon { color: #d97706; }
.expiry-card--15 .expiry-card__icon { color: #dc2626; }
.expiry-card--expired .expiry-card__icon { color: #6b7280; }

.expiry-card--all.is-active    { border-color: #0b3d91; box-shadow: 0 4px 16px rgba(11,61,145,0.18); }
.expiry-card--45.is-active     { border-color: #2563eb; box-shadow: 0 4px 16px rgba(37,99,235,0.18); }
.expiry-card--30.is-active     { border-color: #d97706; box-shadow: 0 4px 16px rgba(217,119,6,0.18); }
.expiry-card--15.is-active     { border-color: #dc2626; box-shadow: 0 4px 16px rgba(220,38,38,0.18); }
.expiry-card--expired.is-active { border-color: #6b7280; box-shadow: 0 4px 16px rgba(107,114,128,0.18); }

.expiry-card.is-active .expiry-card__count { color: inherit; }
.expiry-card--all.is-active .expiry-card__count    { color: #0b3d91; }
.expiry-card--45.is-active .expiry-card__count     { color: #2563eb; }
.expiry-card--30.is-active .expiry-card__count     { color: #d97706; }
.expiry-card--15.is-active .expiry-card__count     { color: #dc2626; }
.expiry-card--expired.is-active .expiry-card__count { color: #6b7280; }

.invoice-card--all .expiry-card__icon       { color: #0b3d91; }
.invoice-card--unpaid .expiry-card__icon    { color: #d97706; }
.invoice-card--paid .expiry-card__icon      { color: #16a34a; }
.invoice-card--cancelled .expiry-card__icon { color: #9ca3af; }
.invoice-card--refunded .expiry-card__icon  { color: #2563eb; }

.invoice-card--all.is-active       { border-color: #0b3d91; box-shadow: 0 4px 16px rgba(11,61,145,0.18); }
.invoice-card--unpaid.is-active    { border-color: #d97706; box-shadow: 0 4px 16px rgba(217,119,6,0.18); }
.invoice-card--paid.is-active      { border-color: #16a34a; box-shadow: 0 4px 16px rgba(22,163,74,0.18); }
.invoice-card--cancelled.is-active { border-color: #9ca3af; box-shadow: 0 4px 16px rgba(156,163,175,0.18); }
.invoice-card--refunded.is-active  { border-color: #2563eb; box-shadow: 0 4px 16px rgba(37,99,235,0.18); }

.invoice-card--all.is-active .expiry-card__count       { color: #0b3d91; }
.invoice-card--unpaid.is-active .expiry-card__count    { color: #d97706; }
.invoice-card--paid.is-active .expiry-card__count      { color: #16a34a; }
.invoice-card--cancelled.is-active .expiry-card__count { color: #9ca3af; }
.invoice-card--refunded.is-active .expiry-card__count   { color: #2563eb; }

@media (max-width: 600px) {
    .domain-expiry-cards {
        gap: 0.5rem;
    }
    .expiry-card {
        min-width: 100px;
        padding: 0.75rem 0.5rem;
    }
    .expiry-card__count {
        font-size: 1.4rem;
    }
}

/* =====================================================
   HIDE OLD RIGHT-SIDE SIDEBAR ON CLIENT AREA PAGES
   Ensures full-width content after sidebar removal.
   The .pm-product-sidebar is exempted so the product
   details page can display its actions panel.
   ===================================================== */
#main-body .sidebar,
#main-body .card-sidebar {
    display: none !important;
}
#main-body .pm-product-sidebar,
#main-body .pm-product-sidebar .sidebar,
#main-body .pm-domain-sidebar,
#main-body .pm-domain-sidebar .card-sidebar,
#main-body .pm-account-sidebar,
#main-body .pm-domain-sidebar .sidebar {
    display: block !important;
}

#main-body .primary-content {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

/* =====================================================
   STORE / CART ORDER PAGE LAYOUT
   Left sidebar (brand nav) + content area
   ===================================================== */

/* -- Cart layout wrapper -- */
.pm-cart-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* -- Left sidebar -- */
.pm-cart-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0b3d91 0%, #1e6bd6 55%, #0b3d91 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    z-index: 1020;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    box-shadow: 2px 0 14px rgba(11, 61, 145, 0.15);
}

.pm-cart-sidebar::-webkit-scrollbar { display: none; }

.pm-cart-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none !important;
    flex-shrink: 0;
}

.pm-cart-sidebar-logo {
    height: 26px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.pm-cart-logo-icon {
    display: none;
    filter: none;
    opacity: 1;
    height: 32px;
    border-radius: 50%;
}

.pm-cart-sidebar-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

/* -- Sidebar panels (moved from standard_cart) -- */
.pm-cart-sidebar-panels {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.pm-cart-sidebar-panels .card-sidebar,
.pm-cart-sidebar-panels .panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.pm-cart-sidebar-panels .card-sidebar + .card-sidebar,
.pm-cart-sidebar-panels .panel + .panel {
    border-top: 1px solid rgba(255,255,255,0.08) !important;
}

.pm-cart-sidebar-panels .card-header,
.pm-cart-sidebar-panels .panel-heading {
    background: transparent !important;
    border: none !important;
    padding: 0.6rem 1.25rem 0.35rem;
}

.pm-cart-sidebar-panels .card-title,
.pm-cart-sidebar-panels .panel-title {
    font-size: 0.7rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45) !important;
    margin: 0;
}

.pm-cart-sidebar-panels .card-title a,
.pm-cart-sidebar-panels .panel-title a {
    color: rgba(255,255,255,0.45) !important;
    text-decoration: none;
    pointer-events: none;
}

.pm-cart-sidebar-panels .card-minimise {
    display: none !important;
}

.pm-cart-sidebar-panels .card-body,
.pm-cart-sidebar-panels .panel-body,
.pm-cart-sidebar-panels .collapsable-card-body {
    display: block !important;
    padding: 0.25rem 0 !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

.pm-cart-sidebar-panels .list-group {
    margin: 0;
    padding: 0;
    background: transparent;
}

.pm-cart-sidebar-panels .list-group-item {
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
    border-radius: 0;
    text-decoration: none;
}

.pm-cart-sidebar-panels .list-group-item:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    padding-left: 1.5rem;
}

.pm-cart-sidebar-panels .list-group-item.active {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    font-weight: 600;
    border-left: 3px solid #fff !important;
    padding-left: calc(1.25rem - 3px);
}

.pm-cart-sidebar-panels .list-group-item .badge {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.7rem;
    margin-left: auto;
}

.pm-cart-sidebar-panels .card-footer {
    background: transparent !important;
    border: none !important;
    padding: 0.35rem 1.25rem 0.75rem;
}

.pm-cart-sidebar-panels .card-footer .btn {
    display: block;
    width: 100%;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    transition: background 0.15s;
}

.pm-cart-sidebar-panels .card-footer .btn:hover {
    background: rgba(255,255,255,0.2);
}

/* -- Bottom link -- */
.pm-cart-sidebar-bottom {
    flex-shrink: 0;
    padding: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.pm-cart-sidebar-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.65) !important;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s;
}

.pm-cart-sidebar-back:hover {
    background: rgba(255,255,255,0.08);
    color: #fff !important;
}

/* -- Sidebar overlay (mobile) -- */
.pm-cart-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1019;
    backdrop-filter: blur(2px);
}

.pm-cart-sidebar-overlay.open {
    display: block;
}

/* -- Content area -- */
.pm-cart-content-area {
    flex: 1;
    margin-left: 240px;
    min-width: 0;
}

.pm-order-body-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 64px - 60px);
}

.pm-order-main-content {
    min-width: 0;
}

/* -- No-sidebar pages: hide sidebar, full-width content -- */
body.pm-cart-no-sidebar .pm-cart-sidebar {
    display: none;
}

body.pm-cart-no-sidebar .pm-cart-content-area {
    margin-left: 0;
}

body.pm-cart-no-sidebar .pm-order-body-container {
    max-width: 1200px;
}

body.pm-cart-no-sidebar #order-standard_cart > .row > .cart-sidebar,
body.pm-cart-no-sidebar #order-standard_cart > .row > .col-md-3,
body.pm-cart-no-sidebar #order-standard_cart > .row > .col-sm-3 {
    display: none !important;
}

body.pm-cart-no-sidebar #order-standard_cart > .row > .cart-body,
body.pm-cart-no-sidebar #order-standard_cart > .row > .col-md-9,
body.pm-cart-no-sidebar #order-standard_cart > .row > .col-sm-9 {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

/* -- Mobile hamburger in cart header -- */
.pm-order-header-menu {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f8f9fa;
    color: #374151;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s;
    margin-right: 0.5rem;
}

.pm-order-header-menu:hover { background: #e2e8f0; }

/* -- Responsive: tablet -- */
@media (max-width: 991px) {
    .pm-cart-sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
        top: 0;
        z-index: 1050;
    }

    .pm-cart-sidebar.open {
        transform: translateX(0);
    }

    .pm-cart-content-area {
        margin-left: 0;
    }

    .pm-order-header-menu {
        display: inline-flex;
    }

    .pm-order-body-container {
        padding: 1rem;
    }
}

/* -- Responsive: small mobile -- */
@media (max-width: 640px) {
    .pm-order-body-container {
        padding: 1rem;
    }
}

/* =====================================================
   GLOBAL FONT SIZE CORRECTIONS
   Standard recommended sizes: body 15-16px, labels 13-14px
   ===================================================== */

/* Base body font */
body {
    font-size: 15px !important;
    line-height: 1.55;
}

/* General page content */
.ca-main-content,
.container-fluid,
.content-wrapper,
.card-body,
.panel-body,
.tab-content {
    font-size: 15px;
}

/* Headings */
h1, .h1 { font-size: 1.75rem !important; }
h2, .h2 { font-size: 1.5rem  !important; }
h3, .h3 { font-size: 1.25rem !important; }
h4, .h4 { font-size: 1.1rem  !important; }
h5, .h5 { font-size: 1rem    !important; }
h6, .h6 { font-size: 0.9rem  !important; }

/* Card titles */
.card-title,
.panel-title {
    font-size: 1rem !important;
}

/* Body text and paragraphs */
p, li, label, span, td, th, dd, dt {
    font-size: inherit;
}

/* Form controls */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
    font-size: 14px !important;
}

/* Buttons — base */
.btn {
    font-size: 14px !important;
}
.btn-sm {
    font-size: 13px !important;
}
.btn-lg {
    font-size: 16px !important;
}
.btn-xs {
    font-size: 12px !important;
}

/* Sidebar nav items */
.ca-nav-item a,
.ca-nav-label {
    font-size: 13.5px !important;
}

/* Topbar pills / quick stats */
.ca-stat-pill,
.topbar-pill {
    font-size: 13px !important;
}

/* Badge counts */
.badge {
    font-size: 11px !important;
}

/* Breadcrumb */
.breadcrumb-item,
.breadcrumb-item a {
    font-size: 13px !important;
}

/* Alert messages */
.alert {
    font-size: 14px !important;
}

/* Footer */
.ca-footer,
footer {
    font-size: 13px !important;
}

/* Small helper text */
.text-muted,
.help-block,
small,
.small {
    font-size: 13px !important;
}

/* Mobile bottom bar labels */
.ca-bb-label {
    font-size: 11px !important;
}

/* View filter buttons */
.view-filter-btns .list-group-item {
    font-size: 13.5px !important;
}

/* Announcements / ticker */
.ca-ticker-text {
    font-size: 13px !important;
}

/* =====================================================
   TABLE-BASED PAGES — MODERN UI IMPROVEMENTS
   Applies to: Domains, Services, Invoices, Tickets,
   Quotes, Emails, and all DataTable list pages.
   ===================================================== */

/* ── Table container card ── */
.table-container {
    background: #ffffff;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow-sm);
    overflow: hidden;
}

/* ── Table base ── */
.table-list,
.table-container .table {
    margin-bottom: 0;
    width: 100% !important;
    border-collapse: collapse;
}

/* ── Header row ── */
.table-list thead th,
.table-container .table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--ui-border) !important;
    border-top: none !important;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.6rem 1rem;
    white-space: nowrap;
    vertical-align: middle;
}

/* ── Body rows ── */
.table-list tbody tr,
.table-container .table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.12s ease;
    cursor: pointer;
}

.table-list tbody tr:last-child,
.table-container .table tbody tr:last-child {
    border-bottom: none;
}

/* ── Zebra striping (very subtle) ── */
.table-list tbody tr:nth-child(odd),
.table-container .table tbody tr:nth-child(odd) {
    background: #ffffff;
}
.table-list tbody tr:nth-child(even),
.table-container .table tbody tr:nth-child(even) {
    background: #fafbfd;
}

/* ── Row hover ── */
.table-list tbody tr:hover,
.table-container .table tbody tr:hover {
    background: #f0f6ff !important;
}

/* ── Cells — tighter vertical padding to reduce whitespace ── */
table.table-list tbody td,
.table-list tbody td,
.table-container .table tbody td {
    padding: 0.45rem 1rem !important;
    vertical-align: middle;
    color: var(--ui-text);
    font-size: 14px;
    border-top: none !important;
    line-height: 1.35;
}



/* ── Status badges — enhanced pill style ── */
.label.status,
span.status {
    display: inline-flex;
    align-items: center;
    padding: 0.3em 0.75em;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    text-transform: capitalize;
}

/* Active / registered */
.status-active,
.status-registered {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

/* Expired / overdue */
.status-expired,
.status-overdue {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

/* Pending */
.status-pending,
.status-pendingregistration,
.status-pendingtransfer {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

/* Suspended / cancelled / terminated */
.status-suspended,
.status-terminated {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
}

/* Paid / paid invoices */
.status-paid {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

/* Unpaid invoices */
.status-unpaid {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

/* Cancelled / refunded */
.status-cancelled,
.status-refunded {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
}

/* Draft / collections */
.status-draft,
.status-collections {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

/* Ticket statuses */
.status-open {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}
.status-answered {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}
.status-customerreply {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}
.status-closed,
.status-onhold {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
}

/* Custom-color status (inline style) */
.status-custom {
    border: 1px solid rgba(0,0,0,0.08) !important;
}

/* ── Bulk action button group (top of tables) ── */
.btn-group.btn-group-sm .btn,
.btn-group .btn.setBulkAction {
    border-radius: 0 !important;
    font-size: 13px;
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    color: #334155;
    background: #ffffff;
    border: 1px solid var(--ui-border);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-group.btn-group-sm > .btn:first-child,
.btn-group.btn-group-sm > .btn-group:first-child > .btn {
    border-radius: var(--ui-radius-sm) 0 0 var(--ui-radius-sm) !important;
}
.btn-group.btn-group-sm > .btn:last-child,
.btn-group.btn-group-sm > .btn-group:last-child > .btn:last-child,
.btn-group.btn-group-sm > .btn-group:last-child > .dropdown-toggle {
    border-radius: 0 var(--ui-radius-sm) var(--ui-radius-sm) 0 !important;
}

.btn-group.btn-group-sm .btn:hover,
.btn-group .btn.setBulkAction:hover {
    background: #f1f5f9;
    color: var(--ui-primary);
    border-color: #d0daea;
    z-index: 1;
}

/* ── Create ticket / top-action button ── */
.ca-tickets-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* ── DataTable listtable wrapper (search + info bar above table) ── */
.listtable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--ui-border);
}

/* ── DataTable search input ── */
.dataTables_filter {
    display: flex;
    align-items: center;
}
.dataTables_filter label {
    margin-bottom: 0;
    font-size: 13px;
    color: var(--ui-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dataTables_filter input[type="search"] {
    height: 34px;
    padding: 0.3rem 0.6rem;
    font-size: 13px;
    border: 1px solid var(--ui-border);
    border-radius: 6px !important;
    background: #ffffff;
    color: var(--ui-text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 200px;
}
.dataTables_filter input[type="search"]:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.1);
}

/* ── DataTable info text ── */
.dataTables_info {
    font-size: 13px;
    color: var(--ui-muted);
    padding: 0;
    white-space: nowrap;
}

/* ── DataTable length select (rows per page) ── */
.dataTables_length {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--ui-border);
}
.dataTables_length label {
    margin-bottom: 0;
    font-size: 13px;
    color: var(--ui-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dataTables_length select {
    height: 32px;
    padding: 0.2rem 0.5rem;
    font-size: 13px;
    border: 1px solid var(--ui-border);
    border-radius: 6px !important;
    background: #ffffff;
    color: var(--ui-text);
    cursor: pointer;
    transition: border-color 0.15s;
}
.dataTables_length select:focus {
    border-color: var(--ui-primary);
    outline: none;
}

/* ── DataTable pagination ── */
.dataTables_paginate {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--ui-border);
    justify-content: flex-end;
}
.dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.45rem;
    font-size: 13px;
    border-radius: 6px !important;
    border: 1px solid transparent !important;
    color: #475569 !important;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    text-decoration: none !important;
    line-height: 1;
}
.dataTables_paginate .paginate_button:hover {
    background: #f1f5f9 !important;
    border-color: var(--ui-border) !important;
    color: var(--ui-text) !important;
}
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: var(--ui-primary) !important;
    border-color: var(--ui-primary) !important;
    color: #ffffff !important;
    font-weight: 600;
}
.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.35;
    cursor: not-allowed;
    background: transparent !important;
    color: #94a3b8 !important;
}

/* ── DataTable bottom bar (length + pagination in one row) ── */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_paginate {
    border-top: none;
    padding: 0;
    background: transparent;
}
.dataTables_wrapper > .row:last-child,
.dataTables_wrapper > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--ui-border);
    margin: 0 !important;
}

/* ── Ticket subject link ── */
.ticket-number {
    display: inline-block;
    font-size: 12px;
    color: var(--ui-muted);
    margin-right: 0.4rem;
    font-weight: 500;
}
.ticket-subject {
    color: var(--ui-text);
    font-weight: 500;
    font-size: 14px;
}
.ticket-subject.unread {
    font-weight: 700;
    color: var(--ui-primary);
}
td a.border-left {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 0.25rem;
    border: none !important;
    padding: 0 !important;
    color: inherit;
}
td a.border-left:hover .ticket-subject {
    color: var(--ui-primary);
    text-decoration: underline;
}

/* ── Service product name ── */
.table-list tbody td strong {
    font-weight: 600;
    color: #1e293b;
}
.table-list tbody td a[target="_blank"] {
    font-size: 0.8rem;
    color: var(--ui-muted);
}
.table-list tbody td a[target="_blank"]:hover {
    color: var(--ui-primary);
}

/* ── Checkbox column ── */
.width-fixed-20 { width: 20px; min-width: 20px; max-width: 20px; }
.table-list tbody td input[type="checkbox"],
.table-list thead th input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--ui-primary);
    vertical-align: middle;
    display: block;
    margin: 0 auto;
}

/* ── SSL icon column — fixed width, centred ── */
td.ssl-info,
th.ssl-info {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
td.ssl-info img {
    display: block;
    margin: 0 auto;
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
}


/* ── All list tables: enforce consistent row height & alignment ── */
.table-list tbody tr,
.table-container .table tbody tr {
    height: 52px;
}
.table-list tbody td,
.table-container .table tbody td {
    vertical-align: middle !important;
}
.table-list thead th,
.table-container .table thead th {
    vertical-align: middle !important;
}

/* ── DataTables sort icon alignment ── */
.table-list thead th.sorting,
.table-list thead th.sorting_asc,
.table-list thead th.sorting_desc,
.table-container .table thead th.sorting,
.table-container .table thead th.sorting_asc,
.table-container .table thead th.sorting_desc {
    padding-right: 1.4rem !important;
    position: relative;
    cursor: pointer;
}
.table-list thead th.sorting::after,
.table-list thead th.sorting_asc::after,
.table-list thead th.sorting_desc::after,
.table-container .table thead th.sorting::after,
.table-container .table thead th.sorting_asc::after,
.table-container .table thead th.sorting_desc::after {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
}

/* ── Status badge: block-level so it centres cleanly ── */
#tableDomainsList .label.status,
#tableDomainsList span.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

/* ── Loading spinner ── */
#tableLoading {
    padding: 3rem 1rem;
    color: var(--ui-muted);
    font-size: 0.9rem;
}
#tableLoading i {
    color: var(--ui-primary);
    margin-right: 0.5rem;
}

/* ── Filter sidebar buttons (view-filter-btns) ── */
.view-filter-btns .list-group-item {
    border-radius: 6px !important;
    border: none;
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
    color: #475569;
    transition: background 0.12s, color 0.12s;
}
.view-filter-btns .list-group-item:hover {
    background: #f1f5f9;
    color: var(--ui-primary);
}
.view-filter-btns .list-group-item.active {
    background: #eff6ff !important;
    color: var(--ui-primary) !important;
    font-weight: 600;
}

/* ── Responsive table adjustments ── */
@media (max-width: 768px) {
    table.table-list tbody td,
    .table-list tbody td,
    .table-container .table tbody td {
        padding: 0.4rem 0.6rem !important;
        font-size: 13px;
    }
    .table-list thead th,
    .table-container .table thead th {
        padding: 0.5rem 0.6rem;
        font-size: 11px;
    }
    .dataTables_filter input[type="search"] {
        width: 140px;
        font-size: 13px;
    }
    .listtable {
        padding: 0.5rem 0.75rem;
    }
    .btn-group.btn-group-sm .btn {
        padding: 0.35rem 0.55rem;
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .dataTables_filter input[type="search"] {
        width: 120px;
        font-size: 13px;
    }
    .listtable {
        flex-direction: column;
        align-items: flex-start;
    }
    .table-list thead th,
    .table-container .table thead th {
        font-size: 11px;
        padding: 0.45rem 0.5rem;
    }
    table.table-list tbody td,
    .table-list tbody td,
    .table-container .table tbody td {
        font-size: 13px;
        padding: 0.35rem 0.5rem !important;
    }
}

/* =====================================================
   TICKET VIEW — RATING STARS & REPLY TEXTAREA FIXES
   ===================================================== */

/* ── Fix star rating font-family (FA5 Free/Pro/Duotone) ── */
.ticket-reply .rating span.star,
.ticket-reply .rating-done span.star {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Duotone", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Empty star glyph */
.ticket-reply .rating span.star::before,
.ticket-reply .rating-done span.star::before {
    content: "\f005" !important;
    color: #d1d5db !important;
}

/* Filled star on hover (RTL direction fills forward) */
.ticket-reply .rating span.star:hover::before,
.ticket-reply .rating span.star:hover ~ span.star::before {
    content: "\f005" !important;
    color: #f59e0b !important;
}

/* Already-rated active stars */
.ticket-reply .rating-done span.star.active::before {
    content: "\f005" !important;
    color: #f59e0b !important;
}

/* Rating container layout */
.ticket-reply .rating,
.ticket-reply .rating-done {
    float: right;
    padding: 6px 10px;
    unicode-bidi: bidi-override;
    direction: rtl;
    font-size: 22px;
    line-height: 1;
    cursor: default;
}

.ticket-reply .rating span.star {
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.1s;
}

.ticket-reply .rating-done .rated {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    direction: ltr;
}

/* ── Reply textarea — larger, comfortable for typing ── */
.md-editor {
    border: 1px solid var(--ui-border) !important;
    border-radius: var(--ui-radius-sm) !important;
    overflow: hidden;
}

.md-editor > .btn-toolbar {
    background: #f8fafc !important;
    border-bottom: 1px solid var(--ui-border) !important;
    padding: 6px 8px !important;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.md-editor > textarea.markdown-editor,
.md-editor > .md-preview {
    min-height: 280px !important;
    height: auto !important;
    padding: 16px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
    border-top: none !important;
    border-bottom: none !important;
    background: #ffffff !important;
    color: var(--ui-text) !important;
    transition: box-shadow 0.15s;
}

.md-editor > textarea.markdown-editor:focus {
    outline: none !important;
    box-shadow: inset 0 0 0 2px rgba(30, 107, 214, 0.15) !important;
}

.md-editor.active {
    border-color: var(--ui-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.1) !important;
}

/* Fallback: plain textarea without markdown wrapper */
textarea#inputMessage:not(.md-editor textarea) {
    min-height: 280px !important;
    height: auto !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
    padding: 14px !important;
}

/* Markdown status bar */
.markdown-editor-status {
    padding: 4px 12px !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
    background: #f8fafc;
    border-top: 1px solid var(--ui-border);
    text-align: right;
}

/* Toolbar buttons inside md-editor */
.md-editor .btn-toolbar .btn {
    font-size: 12px !important;
    padding: 4px 8px !important;
    height: 30px;
    line-height: 1;
    border-radius: 5px !important;
}

.md-editor .btn-toolbar .btn-group {
    margin-right: 4px !important;
}

/* ── Reply form spacing ── */
#ticketReplyContainer .card-body {
    padding: 1.5rem !important;
}

#ticketReplyContainer .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* ── View ticket — message area ── */
.ticket-reply .message {
    font-size: 14px;
    line-height: 1.7;
}

/* ── Posted-by meta line ── */
.ticket-reply .posted-by {
    padding: 10px 16px;
    font-size: 13px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
}

.ticket-reply.staff .posted-by {
    background: #eff6ff;
    border-bottom-color: #dbeafe;
}

.posted-by-name {
    font-weight: 600;
    color: #1e293b;
}

.posted-on {
    color: #94a3b8;
    font-size: 12px;
}

.requestor-badge {
    font-size: 11px !important;
    border-radius: 999px;
    padding: 0.25em 0.65em;
    font-weight: 600;
}

@media (max-width: 575px) {
    .md-editor > textarea.markdown-editor,
    .md-editor > .md-preview {
        min-height: 200px !important;
    }
    .ticket-reply .rating,
    .ticket-reply .rating-done {
        font-size: 18px;
        float: none;
        display: block;
        text-align: center;
        direction: ltr;
    }
}

/* =====================================================
   DOMAINS LIST TABLE
   ===================================================== */

#tableDomainsList {
    width: 100% !important;
    table-layout: auto;
    border-collapse: collapse;
}

#tableDomainsList thead th,
#tableDomainsList tbody td {
    vertical-align: middle;
    text-align: left;
    padding: 10px 12px;
}

#tableDomainsList thead th:nth-child(1),
#tableDomainsList tbody td:nth-child(1) {
    width: 36px;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#tableDomainsList thead th:nth-child(2),
#tableDomainsList tbody td:nth-child(2) {
    width: 44px;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

#tableDomainsList thead th:nth-child(3),
#tableDomainsList tbody td:nth-child(3) {
    min-width: 200px;
    white-space: normal;
    word-break: break-all;
}

#tableDomainsList thead th:nth-child(4),
#tableDomainsList tbody td:nth-child(4),
#tableDomainsList thead th:nth-child(5),
#tableDomainsList tbody td:nth-child(5) {
    white-space: nowrap;
}

#tableDomainsList thead th:nth-child(6),
#tableDomainsList tbody td:nth-child(6) {
    white-space: nowrap;
    text-align: center;
}

#tableDomainsList tbody td:nth-child(3) > a {
    display: block;
    font-weight: 500;
    color: var(--ui-primary);
    word-break: break-all;
    margin-bottom: 2px;
}

#tableDomainsList td small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
}

#tableDomainsList td small i.fa-check,
#tableDomainsList td small i.fa-times {
    font-size: 11px;
    flex-shrink: 0;
}

#tableDomainsList td .label.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #tableDomainsList {
        min-width: 720px;
    }
}

/* =====================================================
   INVOICE SUMMARY - SINGLE-ROW HORIZONTAL LAYOUT
   Title on top (small), value below (bold). Total highlighted.
   ===================================================== */

.inv-summary-row-table {
    width: 100%;
    margin-top: 14px;
    border-collapse: collapse;
    table-layout: fixed;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.inv-summary-row-table thead th {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 10px 12px 4px;
    text-align: center;
    vertical-align: middle;
    background: #f8fafc;
    border: none;
    white-space: nowrap;
}

.inv-summary-row-table tbody td {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    padding: 4px 12px 12px;
    text-align: center;
    vertical-align: middle;
    background: #f8fafc;
    border: none;
    white-space: nowrap;
}

.inv-summary-row-table thead th + th,
.inv-summary-row-table tbody td + td {
    border-left: 1px solid #e5e7eb;
}

/* Highlight the TOTAL / Balance Due column */
.inv-summary-row-table thead th.inv-summary-row-total-col,
.inv-summary-row-table tbody td.inv-summary-row-total-col {
    background: #eaf3ff;
}

.inv-summary-row-table thead th.inv-summary-row-total-col {
    color: #0b3d91;
    font-weight: 600;
}

.inv-summary-row-table tbody td.inv-summary-row-total-col {
    color: #0b3d91;
    font-size: 16px;
    font-weight: 800;
}

.inv-summary-row-table tr {
    display: table-row;
}
.inv-summary-row-table td,
.inv-summary-row-table th {
    display: table-cell;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .inv-summary-row-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* =====================================================
   GLOBAL TABLE NORMALIZATION (Client Area)
   Safe structural + readability fixes.
   Does NOT alter table/tr/td display semantics.
   ===================================================== */

.main-content table,
.tab-content table,
.panel table,
.card table,
table.table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    background: transparent;
}

.main-content table th,
.main-content table td,
.tab-content table th,
.tab-content table td,
.panel table th,
.panel table td,
.card table th,
.card table td,
table.table th,
table.table td {
    vertical-align: middle;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.45;
    padding: 10px 12px;
}

/* Keep currency / numeric / action cells from wrapping awkwardly */
.main-content table td.col-amount,
.main-content table th.col-amount,
.tab-content table td.col-amount,
.tab-content table th.col-amount,
table.table td.col-amount,
table.table th.col-amount,
table.table td.text-right,
table.table th.text-right,
table.table td.text-center,
table.table th.text-center {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Header readability */
.main-content table thead th,
.tab-content table thead th,
.panel table thead th,
.card table thead th,
table.table thead th {
    font-weight: 600;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* Row separators */
.main-content table tbody tr,
.tab-content table tbody tr,
.panel table tbody tr,
.card table tbody tr,
table.table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.main-content table tbody tr:last-child,
.tab-content table tbody tr:last-child,
.panel table tbody tr:last-child,
.card table tbody tr:last-child,
table.table tbody tr:last-child {
    border-bottom: none;
}

/* Remove any accidental clipping on cell content */
.main-content table td *,
.tab-content table td *,
.panel table td *,
.card table td *,
table.table td * {
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
}

/* Long links / emails / domains should wrap cleanly */
.main-content table td a,
.tab-content table td a,
.panel table td a,
.card table td a,
table.table td a {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Responsive horizontal scroll wrapper (WHMCS uses .table-container / .table-responsive) */
.table-responsive,
.table-container,
.tablelist-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > table,
.table-container > table,
.tablelist-wrapper > table {
    min-width: 100%;
}

/* Prevent images/badges in cells from forcing overflow */
.main-content table td img,
.tab-content table td img,
table.table td img {
    max-width: 100%;
    height: auto;
}

/* Small screens: allow horizontal scroll on dense tables without collapsing layout */
@media (max-width: 640px) {
    .main-content > table,
    .tab-content > table,
    .panel > table,
    .card > table {
        display: block;
        overflow-x: auto;
        white-space: normal;
    }
}

/* ==========================================================================
   Unified Client Area Tables
   Clean, consistent, aligned tables across every client-area page.
   ========================================================================== */

:root {
    --ca-table-border: #e6eaf0;
    --ca-table-header-bg: #f7f9fc;
    --ca-table-header-color: #475569;
    --ca-table-row-zebra: #fafbfd;
    --ca-table-row-hover: #eef4ff;
    --ca-table-text: #1f2a37;
    --ca-table-muted: #64748b;
    --ca-table-radius: 10px;
    --ca-table-row-height: 56px;
    --ca-table-cell-py: 14px;
    --ca-table-cell-px: 16px;
}

/* Outer wrapper: horizontal scroll on overflow, rounded edges */
.table-container,
.tablebg,
.table-responsive {
    background: #ffffff;
    border: 1px solid var(--ca-table-border);
    border-radius: var(--ca-table-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.table-container > .table,
.table-responsive > .table,
.table-container > table,
.table-responsive > table {
    margin-bottom: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Core table reset */
.table,
.table-list,
table.table,
table.table-list,
.datatable,
table.dataTable,
.tablebg > table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto;
    font-size: 14px;
    color: var(--ca-table-text);
    background: #ffffff;
}

/* Header */
.table thead th,
.table-list thead th,
table.table thead th,
table.table-list thead th,
.datatable thead th,
table.dataTable thead th,
.tablebg > table thead th {
    background: var(--ca-table-header-bg) !important;
    color: var(--ca-table-header-color) !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: var(--ca-table-cell-py) var(--ca-table-cell-px) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ca-table-border) !important;
    vertical-align: middle !important;
    text-align: left;
    white-space: nowrap;
    line-height: 1.3;
}

/* Body cells */
.table tbody td,
.table-list tbody td,
table.table tbody td,
table.table-list tbody td,
.datatable tbody td,
table.dataTable tbody td,
.tablebg > table tbody td {
    padding: var(--ca-table-cell-py) var(--ca-table-cell-px) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ca-table-border) !important;
    vertical-align: middle !important;
    line-height: 1.5;
    color: var(--ca-table-text);
    height: var(--ca-table-row-height);
    background: transparent;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Keep action-cell contents on one line where possible */
.table tbody td .btn,
.table-list tbody td .btn,
.table tbody td .label,
.table-list tbody td .label,
.table tbody td .badge,
.table-list tbody td .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    line-height: 1.2;
    white-space: nowrap;
}

/* Icons inline with text */
.table tbody td i,
.table-list tbody td i,
.table thead th i,
.table-list thead th i {
    vertical-align: middle;
    line-height: 1;
}

.table tbody td i + span,
.table tbody td span + i,
.table-list tbody td i + span,
.table-list tbody td span + i {
    margin-left: 4px;
}

/* Avoid final row double border */
.table tbody tr:last-child td,
.table-list tbody tr:last-child td,
table.dataTable tbody tr:last-child td,
.tablebg > table tbody tr:last-child td {
    border-bottom: 0 !important;
}

/* Zebra striping */
.table tbody tr:nth-child(odd),
.table-list tbody tr:nth-child(odd),
table.dataTable tbody tr:nth-child(odd),
.tablebg > table tbody tr:nth-child(odd) {
    background: #ffffff !important;
}

.table tbody tr:nth-child(even),
.table-list tbody tr:nth-child(even),
table.dataTable tbody tr:nth-child(even),
.tablebg > table tbody tr:nth-child(even) {
    background: var(--ca-table-row-zebra) !important;
}

/* Hover */
.table tbody tr:hover,
.table-list tbody tr:hover,
table.dataTable tbody tr:hover,
.tablebg > table tbody tr:hover {
    background: var(--ca-table-row-hover) !important;
    transition: background-color 0.15s ease-in-out;
}

/* Selected rows retain contrast */
.table tbody tr.selected,
.table-list tbody tr.selected,
table.dataTable tbody tr.selected {
    background: #e4edff !important;
}

/* Alignment helpers that WHMCS frequently uses */
.table .text-center,
.table-list .text-center,
.table th.text-center,
.table td.text-center {
    text-align: center !important;
}

.table .text-right,
.table-list .text-right,
.table th.text-right,
.table td.text-right {
    text-align: right !important;
    white-space: nowrap;
}

/* Checkbox column tight */
.table th:has(> input[type="checkbox"]),
.table td:has(> input[type="checkbox"]),
.table-list th:has(> input[type="checkbox"]),
.table-list td:has(> input[type="checkbox"]) {
    width: 40px;
    text-align: center;
    white-space: nowrap;
}

/* Actions column tight, no wrap */
.table th:last-child,
.table td:last-child,
.table-list th:last-child,
.table-list td:last-child {
    white-space: nowrap;
}

.table td:last-child.text-wrap,
.table-list td:last-child.text-wrap {
    white-space: normal;
}

/* Long text cells: domains, emails, URLs */
.table td a[href],
.table-list td a[href] {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Status badges: uniform pill shape */
.table .label,
.table-list .label,
.table .badge,
.table-list .badge,
.table .status,
.table-list .status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Empty-state rows */
.table tbody td.dataTables_empty,
.table-list tbody td.dataTables_empty {
    text-align: center;
    color: var(--ca-table-muted);
    padding: 28px 16px !important;
    font-style: italic;
}

/* DataTables length/filter/info/pagination spacing polish */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 10px 14px;
    color: var(--ca-table-muted);
    font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--ca-table-border);
    border-radius: 8px;
    padding: 6px 10px;
    margin-left: 8px;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    padding: 5px 10px !important;
    border: 1px solid transparent !important;
    margin: 0 2px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--ca-table-row-hover) !important;
    border-color: var(--ca-table-border) !important;
    color: var(--ca-table-text) !important;
}

/* Sorting indicators */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 28px !important;
}

/* Keep inputs/selects inside cells from breaking row height */
.table tbody td input[type="text"],
.table tbody td input[type="email"],
.table tbody td input[type="number"],
.table tbody td select,
.table-list tbody td input[type="text"],
.table-list tbody td input[type="email"],
.table-list tbody td input[type="number"],
.table-list tbody td select {
    height: 34px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--ca-table-border);
    max-width: 100%;
    vertical-align: middle;
}

/* Condensed variant */
.table-condensed tbody td,
.table-condensed thead th,
.table-sm tbody td,
.table-sm thead th {
    padding: 10px 12px !important;
    height: 44px;
}

/* Responsive: allow horizontal scroll on small viewports */
@media (max-width: 768px) {
    .table-container,
    .tablebg,
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table,
    .table-list,
    table.dataTable,
    .tablebg > table {
        min-width: 640px;
    }

    .table thead th,
    .table-list thead th,
    .table tbody td,
    .table-list tbody td {
        padding: 12px 12px !important;
    }
}


/* =====================================================
   ORDER PAGE HEADER / FOOTER
   (Shown on cart.php and /store/ pages instead of default)
   ===================================================== */
body.pm-order-page {
    background: #f4f6f9;
}

body.pm-order-page .header,
body.pm-order-page .navbar,
body.pm-order-page .main-navbar-wrapper,
body.pm-order-page .master-breadcrumb,
body.pm-order-page #footer.footer {
    display: none !important;
}

.pm-order-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pm-order-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pm-order-header-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.pm-order-header-logo {
    height: 36px;
    width: auto;
    display: block;
}

.pm-order-header-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0b3d91;
    letter-spacing: -0.02em;
}

.pm-order-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pm-order-header-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.pm-order-header-link:hover {
    background: #f3f4f6;
    color: #1e6bd6;
    text-decoration: none;
}

.pm-order-header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.05rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.pm-order-header-cart:hover {
    background: #f3f4f6;
    color: #1e6bd6;
    text-decoration: none;
}

.pm-order-header-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50px;
    background: #1e6bd6;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pm-order-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem 0;
}

.pm-order-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pm-order-footer-left {
    display: flex;
    align-items: center;
}

.pm-order-footer-copy {
    font-size: 0.8rem;
    color: #6b7280;
}

.pm-order-footer-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.pm-order-footer-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s;
}

.pm-order-footer-link:hover {
    color: #1e6bd6;
    text-decoration: none;
}

@media (max-width: 640px) {
    .pm-order-header-inner {
        padding: 0 1rem;
        height: 56px;
    }
    .pm-order-header-link span {
        display: none;
    }
    .pm-order-header-link {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        font-size: 1rem;
    }
    .pm-order-body-container {
        padding: 1rem;
    }
    .pm-order-footer-inner {
        flex-direction: column;
        text-align: center;
        padding: 0 1rem;
    }
}

/* =====================================================
   DOMAIN REGISTRATION / CART PAGE — PamirUI Brand
   cart.php?a=add&domain=register and related domain pages
   ===================================================== */

/* ── Hero domain search banner ── */
body.pm-order-page .home-domain-search {
    background: linear-gradient(135deg, #0b3d91 0%, #1e6bd6 60%, #2980d9 100%);
    position: relative;
    overflow: hidden;
}
body.pm-order-page .home-domain-search::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}
body.pm-order-page .home-domain-search h2,
body.pm-order-page .home-domain-search h3,
body.pm-order-page .home-domain-search .sub-heading span {
    color: #ffffff;
    font-weight: 700;
    position: relative;
    z-index: 1;
}
body.pm-order-page .home-domain-search p,
body.pm-order-page .home-domain-search label {
    color: rgba(255,255,255,0.85);
}

/* ── Domain search input bar ── */
body.pm-order-page .home-domain-search .input-group-wrapper {
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 6px;
    backdrop-filter: blur(4px);
    transition: border-color 0.18s, background 0.18s;
    position: relative;
    z-index: 1;
}
body.pm-order-page .home-domain-search .input-group-wrapper:focus-within {
    border-color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.18);
}
body.pm-order-page .home-domain-search .input-group-wrapper .form-control {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    height: 48px;
    padding: 0.6rem 1rem;
}
body.pm-order-page .home-domain-search .input-group-wrapper .form-control::placeholder {
    color: rgba(255,255,255,0.55);
}
body.pm-order-page .home-domain-search .input-group-wrapper .form-control:focus {
    box-shadow: none;
    background: transparent;
}
body.pm-order-page .home-domain-search .input-group-wrapper .btn-primary {
    background: #ffffff;
    color: #0b3d91;
    border: none;
    border-radius: 10px !important;
    font-weight: 700;
    padding: 0.6rem 1.75rem;
    font-size: 0.9rem;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
body.pm-order-page .home-domain-search .input-group-wrapper .btn-primary:hover {
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
body.pm-order-page .home-domain-search .input-group-wrapper .btn-success {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 10px !important;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    transition: background 0.18s, border-color 0.18s;
}
body.pm-order-page .home-domain-search .input-group-wrapper .btn-success:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

/* ── Featured TLD logos ── */
body.pm-order-page .home-domain-search .tld-logos {
    position: relative;
    z-index: 1;
}
body.pm-order-page .home-domain-search .tld-logos li {
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    font-size: 1rem;
}
body.pm-order-page .home-domain-search .tld-logos img {
    filter: brightness(0) invert(1);
    opacity: 0.7;
    width: 48px;
}
body.pm-order-page .home-domain-search .btn-link {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    position: relative;
    z-index: 1;
}
body.pm-order-page .home-domain-search .btn-link:hover {
    color: #ffffff;
}

/* ── Page heading inside cart ── */
body.pm-order-page .pm-order-main-content > h1,
body.pm-order-page .pm-order-main-content > h2,
body.pm-order-page .pm-order-main-content > .page-title,
body.pm-order-page .primary-content > h1,
body.pm-order-page .primary-content > h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

/* ── Domain search results / checker panels ── */
body.pm-order-page #order-standard_cart .card,
body.pm-order-page #order-standard_cart .panel,
body.pm-order-page .pm-order-main-content .card,
body.pm-order-page .primary-content .card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    overflow: hidden;
}

body.pm-order-page #order-standard_cart .card-header,
body.pm-order-page #order-standard_cart .panel-heading,
body.pm-order-page .pm-order-main-content .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    color: #1f2a37;
    font-size: 0.95rem;
}

body.pm-order-page #order-standard_cart .card-body,
body.pm-order-page #order-standard_cart .panel-body,
body.pm-order-page .pm-order-main-content .card-body {
    padding: 1.25rem;
}

/* ── Domain checker results ── */
body.pm-order-page .domain-lookup-result,
body.pm-order-page .domain-checker-result,
body.pm-order-page .lookupresult {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: #ffffff;
    transition: border-color 0.18s, box-shadow 0.18s;
}
body.pm-order-page .domain-lookup-result:hover,
body.pm-order-page .domain-checker-result:hover,
body.pm-order-page .lookupresult:hover {
    border-color: #1e6bd6;
    box-shadow: 0 2px 8px rgba(30, 107, 214, 0.08);
}

/* ── Available domain result (green accent) ── */
body.pm-order-page .domain-available,
body.pm-order-page .available-domain,
body.pm-order-page .domainavailable {
    border-left: 4px solid #22c55e;
}

/* ── Unavailable domain result (muted) ── */
body.pm-order-page .domain-unavailable,
body.pm-order-page .unavailable-domain,
body.pm-order-page .domainunavailable {
    border-left: 4px solid #e5e7eb;
    opacity: 0.7;
}

/* ── Spotlight / featured TLD cards ── */
body.pm-order-page .spotlight-tld,
body.pm-order-page .spotlight-tlds-container .tld-card,
body.pm-order-page .tld-spotlight {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
}
body.pm-order-page .spotlight-tld:hover,
body.pm-order-page .spotlight-tlds-container .tld-card:hover,
body.pm-order-page .tld-spotlight:hover {
    border-color: #1e6bd6;
    box-shadow: 0 4px 16px rgba(30, 107, 214, 0.1);
    transform: translateY(-2px);
}

/* ── Domain pricing table ── */
body.pm-order-page .domain-pricing .featured-tlds-container {
    margin-bottom: 2rem;
}

body.pm-order-page .domain-pricing .featured-tld {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
    margin-bottom: 1rem;
}
body.pm-order-page .domain-pricing .featured-tld:hover {
    border-color: #1e6bd6;
    box-shadow: 0 4px 16px rgba(30, 107, 214, 0.1);
    transform: translateY(-2px);
}
body.pm-order-page .domain-pricing .featured-tld .img-container {
    margin-bottom: 0.75rem;
}
body.pm-order-page .domain-pricing .featured-tld .img-container img {
    width: 56px;
    height: auto;
    opacity: 0.85;
}
body.pm-order-page .domain-pricing .featured-tld .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e6bd6;
}

body.pm-order-page .domain-pricing h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2a37;
    margin-bottom: 1rem;
}

body.pm-order-page .domain-pricing .tld-filters {
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

body.pm-order-page .domain-pricing .currency-selector {
    border-radius: 10px;
    height: 40px;
    border: 1.5px solid var(--fui-border, #e5e7eb);
    font-size: 0.85rem;
    padding: 0.4rem 2.2rem 0.4rem 0.75rem;
}

body.pm-order-page .domain-pricing .table,
body.pm-order-page .domain-pricing #tableDomainPricing {
    border: 1px solid #e6eaf0;
    border-radius: 10px;
    overflow: hidden;
}
body.pm-order-page .domain-pricing .table thead th {
    background: #f7f9fc;
    color: #475569;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e6eaf0;
    padding: 0.75rem 1rem;
}
body.pm-order-page .domain-pricing .table tbody td {
    padding: 0.75rem 1rem;
    color: #1f2a37;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
body.pm-order-page .domain-pricing .table tbody tr:hover {
    background: #eef4ff;
}
body.pm-order-page .domain-pricing .table tbody td small {
    color: #64748b;
}

body.pm-order-page .domain-pricing .tld-sale-group {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* ── Cart order form sections ── */
body.pm-order-page #order-standard_cart h2,
body.pm-order-page .order-form h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

body.pm-order-page #order-standard_cart .sub-heading {
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}
body.pm-order-page #order-standard_cart .sub-heading span {
    background-color: #f4f6f9;
    color: #1e6bd6;
    font-weight: 600;
    padding: 0 1rem;
    font-size: 0.9rem;
}

/* ── Fix input-group layout (input + button on same row) ── */
body.pm-order-page .input-group {
    display: flex;
    flex-wrap: nowrap;
}
body.pm-order-page .input-group > .form-control {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
}
body.pm-order-page .input-group > .input-group-append {
    display: flex;
    flex-shrink: 0;
}

/* ── Domain search input inside cart ── */
body.pm-order-page #order-standard_cart .input-group-lg > .form-control,
body.pm-order-page .domainchecker-form .form-control {
    height: 52px;
    border-radius: 10px 0 0 10px;
    border: 1.5px solid var(--fui-border, #e5e7eb);
    background: var(--fui-bg, #fafafa);
    font-size: 1rem;
    padding: 0.6rem 1rem;
    flex: 1 1 0;
    width: auto;
}
body.pm-order-page #order-standard_cart .input-group-lg > .form-control:focus,
body.pm-order-page .domainchecker-form .form-control:focus {
    border-color: #1e6bd6;
    box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.12);
    background: #ffffff;
}

body.pm-order-page #order-standard_cart .input-group-lg .btn,
body.pm-order-page .domainchecker-form .btn {
    border-radius: 0 10px 10px 0;
    padding: 0.6rem 1.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* ── Primary buttons in cart ── */
body.pm-order-page .btn-primary {
    background: #1e6bd6;
    border-color: #1e6bd6;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 1px 3px rgba(30, 107, 214, 0.18), 0 4px 12px rgba(30, 107, 214, 0.12);
}
body.pm-order-page .btn-primary:hover {
    background: #1a5fc0;
    border-color: #1a5fc0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 107, 214, 0.24), 0 6px 20px rgba(30, 107, 214, 0.16);
}
body.pm-order-page .btn-primary:active {
    background: #164fa1;
    border-color: #164fa1;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(30, 107, 214, 0.18);
}

body.pm-order-page .btn-success {
    background: #16a34a;
    border-color: #16a34a;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.18s, transform 0.12s;
}
body.pm-order-page .btn-success:hover {
    background: #15803d;
    border-color: #15803d;
    transform: translateY(-1px);
}

body.pm-order-page .btn-default,
body.pm-order-page .btn-secondary {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
body.pm-order-page .btn-default:hover,
body.pm-order-page .btn-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #1f2a37;
}

/* ── Order summary sidebar ── */
body.pm-order-page .cart-sidebar .card,
body.pm-order-page .order-summary {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

body.pm-order-page .cart-sidebar .view-cart-items-header,
body.pm-order-page .order-summary-header {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2a37;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* ── Registration form (#registration) ── */
body.pm-order-page #registration {
    padding: 0;
}
body.pm-order-page #registration .field,
body.pm-order-page #registration .form-control {
    height: var(--fui-height, 44px);
    border: 1.5px solid var(--fui-border, #e5e7eb);
    border-radius: var(--fui-radius, 10px);
    background: var(--fui-bg, #fafafa);
    font-size: 0.9rem;
    color: var(--fui-text, #111827);
    transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}
body.pm-order-page #registration .form-control:focus {
    border-color: var(--fui-border-strong, #111827);
    background: var(--fui-bg-focus, #ffffff);
    box-shadow: var(--fui-focus-ring, 0 0 0 3px rgba(17, 24, 39, 0.08));
}
body.pm-order-page #registration label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fui-label, #374151);
    letter-spacing: 0.01em;
}
body.pm-order-page #registration .sub-heading {
    border-color: #e5e7eb;
}
body.pm-order-page #registration .sub-heading span {
    color: #1e6bd6;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Tabs in domain options ── */
body.pm-order-page .nav-tabs {
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.25rem;
}
body.pm-order-page .nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #6b7280;
    padding: 0.65rem 1rem;
    transition: color 0.15s, border-color 0.15s;
}
body.pm-order-page .nav-tabs .nav-link:hover {
    color: #1e6bd6;
    border-bottom-color: #1e6bd6;
}
body.pm-order-page .nav-tabs .nav-link.active {
    color: #1e6bd6;
    border-bottom-color: #1e6bd6;
    background: transparent;
}

/* ── Pricing/billing cycle selector ── */
body.pm-order-page .pricing-selector select,
body.pm-order-page .billing-cycle select,
body.pm-order-page select.number-of-years {
    height: var(--fui-height, 44px);
    border: 1.5px solid var(--fui-border, #e5e7eb);
    border-radius: var(--fui-radius, 10px);
    background: var(--fui-bg, #fafafa);
    font-size: 0.9rem;
    padding: 0.5rem 2.2rem 0.5rem 0.9rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3e%3cpath d='M5.25 7.75a.75.75 0 011.06 0L10 11.44l3.69-3.69a.75.75 0 111.06 1.06l-4.22 4.22a.75.75 0 01-1.06 0L5.25 8.81a.75.75 0 010-1.06z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 18px 18px;
}

/* ── Table styling for domain results DataTable ── */
body.pm-order-page .dataTables_wrapper {
    border-radius: 10px;
    overflow: hidden;
}
body.pm-order-page .dataTables_wrapper .dataTables_filter input {
    height: 38px;
    border: 1.5px solid var(--fui-border, #e5e7eb);
    border-radius: var(--fui-radius-sm, 8px);
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    background: var(--fui-bg, #fafafa);
    transition: border-color 0.18s, box-shadow 0.18s;
}
body.pm-order-page .dataTables_wrapper .dataTables_filter input:focus {
    border-color: #1e6bd6;
    box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.1);
    background: #ffffff;
    outline: none;
}

/* ── Pagination ── */
body.pm-order-page .dataTables_paginate .paginate_button {
    height: 32px;
    min-width: 32px;
    border-radius: 6px !important;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem !important;
    margin: 0 2px !important;
    border: 1px solid transparent !important;
    transition: background 0.15s, color 0.15s;
}
body.pm-order-page .dataTables_paginate .paginate_button.current {
    background: #1e6bd6 !important;
    color: #ffffff !important;
    border-color: #1e6bd6 !important;
    font-weight: 600;
}
body.pm-order-page .dataTables_paginate .paginate_button:hover:not(.current) {
    background: #f1f5f9 !important;
    color: #1e6bd6 !important;
    border-color: #e2e8f0 !important;
}

/* ── Alert/notices inside cart ── */
body.pm-order-page .alert {
    border-radius: 10px;
    border: none;
    font-size: 0.88rem;
}
body.pm-order-page .alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}
body.pm-order-page .alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #22c55e;
}
body.pm-order-page .alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}
body.pm-order-page .alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* ── Checkout step indicators ── */
body.pm-order-page .header-lined h1,
body.pm-order-page .header-lined h2,
body.pm-order-page .header-lined h3 {
    font-weight: 700;
    color: #111827;
}

/* ── Cart totals / summary box ── */
body.pm-order-page .cart-totals,
body.pm-order-page .total-due-today {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
body.pm-order-page .cart-totals .total-label,
body.pm-order-page .total-due-today .total-label {
    font-weight: 700;
    color: #111827;
    font-size: 1rem;
}
body.pm-order-page .cart-totals .total-value,
body.pm-order-page .total-due-today .total-value {
    font-weight: 700;
    color: #1e6bd6;
    font-size: 1.15rem;
}

/* ── Breadcrumb inside cart page ── */
body.pm-order-page .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    font-size: 0.82rem;
}
body.pm-order-page .breadcrumb-item a {
    color: #1e6bd6;
    font-weight: 500;
}
body.pm-order-page .breadcrumb-item.active {
    color: #6b7280;
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
    body.pm-order-page .home-domain-search .p-5 {
        padding: 1.5rem !important;
    }
    body.pm-order-page .home-domain-search h2 {
        font-size: 1.35rem;
    }
    body.pm-order-page .home-domain-search .input-group-wrapper {
        border-radius: 10px;
    }
    body.pm-order-page .home-domain-search .input-group-wrapper .form-control {
        height: 44px;
        font-size: 0.9rem;
    }
    body.pm-order-page .home-domain-search .tld-logos li {
        font-size: 0.85rem;
        padding-right: 12px;
    }
    body.pm-order-page .home-domain-search .tld-logos img {
        width: 36px;
    }
    body.pm-order-page .domain-pricing .featured-tld {
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 480px) {
    body.pm-order-page .home-domain-search .input-group-wrapper .btn-primary,
    body.pm-order-page .home-domain-search .input-group-wrapper .btn-success {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    body.pm-order-page .nav-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.65rem;
    }
}

/* ── Domain search subtitle ── */
body.pm-order-page .pm-domain-subtitle,
.home-domain-search .pm-domain-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    font-weight: 400;
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

/* ── Section headings in domain pricing ── */
body.pm-order-page .pm-section-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2a37;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    display: inline-block;
}

/* Homepage domain search (non-cart) keeps white bg */
body:not(.pm-order-page) .home-domain-search .pm-domain-subtitle {
    color: #6b7280;
}

/* =====================================================
   DOMAIN TRANSFER PAGE — cart.php?a=add&domain=transfer
   Remove duplicate heading; style form to match register page
   ===================================================== */

/* Hide the page title heading ("Transfer Domain") and the
   secondary heading block ("Transfer your domain to us" + subtitle).
   WHMCS outputs these at the top of the transfer page content area. */
body.pm-order-page .order-form-header,
body.pm-order-page .domaintransfer-header,
body.pm-order-page #order-domain-transfer > h2:first-child,
body.pm-order-page #order-domain-transfer > h3:first-child,
body.pm-order-page .pm-order-main-content > .text-center:first-child,
body.pm-order-page .primary-content > .text-center:first-child,
body.pm-order-page #main-body .text-center.sub-heading-intro {
    display: none !important;
}


/* ── Transfer page hero banner — mirrors the register page blue hero ── */
body.pm-order-page .domain-transfer-hero,
body.pm-order-page #domaintransfer-banner {
    background: linear-gradient(135deg, #0b3d91 0%, #1e6bd6 60%, #2980d9 100%);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
}

/* ── Transfer form container — clean card look ── */
body.pm-order-page .domain-transfer-container,
body.pm-order-page #domain-transfer-form,
body.pm-order-page .domaintransfer-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* ── Panel heading ("Single domain transfer") — style like card header ── */
body.pm-order-page .panel.domain-transfer .panel-heading,
body.pm-order-page .card.domain-transfer .card-header,
body.pm-order-page #order-domain-transfer .panel-heading,
body.pm-order-page .panel-domain-transfer .panel-heading,
body.pm-order-page .panel .panel-heading.transfer-heading {
    background: linear-gradient(135deg, #0b3d91 0%, #1e6bd6 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: none;
    letter-spacing: 0.01em;
}

/* ── Make ALL panels on the transfer page use the styled header ── */
body.pm-order-page .panel .panel-heading {
    background: linear-gradient(135deg, #0b3d91 0%, #1e6bd6 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    letter-spacing: 0.01em;
}

body.pm-order-page .panel .panel-heading .panel-title {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
}

body.pm-order-page .panel {
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

body.pm-order-page .panel .panel-body {
    padding: 1.75rem !important;
    background: #ffffff;
}

/* ── Form labels on transfer page ── */
body.pm-order-page .panel .panel-body label,
body.pm-order-page .panel .panel-body .control-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
    display: block;
}

/* ── Inputs on transfer page ── */
body.pm-order-page .panel .panel-body .form-control {
    height: 48px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px !important;
    background: #fafafa;
    font-size: 0.95rem;
    color: #111827;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    padding: 0.6rem 1rem;
}

body.pm-order-page .panel .panel-body .form-control:focus {
    border-color: #1e6bd6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.12);
    outline: none;
}

/* ── Form groups inside transfer panel — consistent spacing ── */
body.pm-order-page .panel .panel-body .form-group {
    margin-bottom: 1.25rem;
}

/* ── Footer of panel (contains Add to Cart button) ── */
body.pm-order-page .panel .panel-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ── Note below the form ("* Excludes certain TLDs…") ── */
body.pm-order-page .domain-transfer-note,
body.pm-order-page .transfer-note,
body.pm-order-page p.text-center.text-muted,
body.pm-order-page .pm-order-main-content > p:last-child,
body.pm-order-page .primary-content > p.text-muted {
    font-size: 0.82rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 0.5rem;
}

/* ── Auth code help link styling ── */
body.pm-order-page .panel .panel-body .pull-right a,
body.pm-order-page .panel .panel-body .text-right a,
body.pm-order-page .panel .panel-body a[href*="authcode"],
body.pm-order-page .panel .panel-body a[href*="eppcode"] {
    font-size: 0.82rem;
    color: #1e6bd6;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
body.pm-order-page .panel .panel-body .pull-right a:hover,
body.pm-order-page .panel .panel-body .text-right a:hover {
    color: #1447e6;
    text-decoration: underline;
}

/* ── Page title on transfer page — match register ── */
body.pm-order-page .pm-order-main-content > h1,
body.pm-order-page .pm-order-main-content > h2,
body.pm-order-page .primary-content > h1,
body.pm-order-page .primary-content > h2,
body.pm-order-page .cart-body > h2,
body.pm-order-page #main-body > h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* ── Responsive: stack panel footer on mobile ── */
@media (max-width: 575px) {
    body.pm-order-page .panel .panel-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    body.pm-order-page .panel .panel-footer .btn {
        width: 100%;
        justify-content: center;
    }
    body.pm-order-page .panel .panel-body {
        padding: 1.25rem !important;
    }
}

/* =====================================================
   GUEST SIDEBAR LAYOUT
   ===================================================== */

/* ── Guest auth CTA in sidebar ── */
.ca-guest-auth-cta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 1;
}

.ca-guest-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ca-guest-auth-login {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.25);
}

.ca-guest-auth-login:hover {
    background: rgba(255,255,255,0.25);
    color: #fff !important;
}

.ca-guest-auth-register {
    background: #fff;
    color: #0b3d91 !important;
    border: 1px solid transparent;
}

.ca-guest-auth-register:hover {
    background: #f0f4ff;
    color: #0b3d91 !important;
}

/* ── Guest topbar search form ── */
.ca-guest-search-form {
    flex: 0 1 400px;
    margin-right: auto;
}

.ca-guest-search-form .input-group {
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ca-guest-search-form .input-group:focus-within {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156,163,175,0.15);
    background: #fff;
}

.ca-guest-search-form .input-group .btn {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 0.4rem 0.75rem;
}

.ca-guest-search-form .input-group .form-control {
    border: none;
    background: transparent;
    font-size: 0.82rem;
    color: #374151;
    padding: 0.4rem 0.75rem;
    box-shadow: none;
}

.ca-guest-search-form .input-group .form-control::placeholder {
    color: #9ca3af;
}

/* ── Guest topbar pills (login/register in topbar) ── */
.ca-pill-guest-login {
    background: #1e6bd6;
    color: #fff !important;
    font-weight: 600;
}

.ca-pill-guest-login:hover {
    background: #1558b8;
    color: #fff !important;
}

.ca-pill-guest-register {
    background: #f0f4ff;
    color: #1e6bd6 !important;
    border: 1px solid #d6e4f7;
    font-weight: 600;
}

.ca-pill-guest-register:hover {
    background: #e0ecff;
    color: #0b3d91 !important;
}

/* =====================================================
   PRODUCT DETAILS - RIGHT SIDEBAR (Actions Panel)
   Shows Login to cPanel, Change Password, etc.
   ===================================================== */

.pm-product-layout {
    margin: 0 -8px;
}

.pm-product-layout > [class*="col-"] {
    padding: 0 8px;
}

.pm-product-sidebar {
    position: sticky;
    top: 16px;
}

/* Hide all sidebar panels by default; JS adds .pm-show-panel to the Actions one */
#main-body .pm-product-sidebar .card-sidebar {
    display: none !important;
}

#main-body .pm-product-sidebar .card-sidebar.pm-show-panel {
    display: block !important;
}

#main-body .pm-product-sidebar .card-sidebar.pm-show-panel .collapsable-card-body {
    display: block !important;
}

.pm-product-sidebar .card-sidebar {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.pm-product-sidebar .card-sidebar + .card-sidebar {
    margin-top: 12px;
}

.pm-product-sidebar .card-sidebar .card-header {
    background: linear-gradient(135deg, #0b3d91 0%, #1558b8 100%);
    border-bottom: none;
    padding: 12px 16px;
}

.pm-product-sidebar .card-sidebar .card-header .card-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.pm-product-sidebar .card-sidebar .card-header .card-minimise {
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.2s;
}

.pm-product-sidebar .card-sidebar .card-header .card-minimise:hover {
    color: #fff;
}

.pm-product-sidebar .card-sidebar .card-body {
    padding: 12px 16px;
    font-size: 0.9375rem;
    color: #475569;
}

.pm-product-sidebar .list-group-flush .list-group-item {
    border-color: #f1f5f9;
    padding: 10px 16px;
    font-size: 0.9375rem;
    color: #334155;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-product-sidebar .list-group-flush .list-group-item i,
.pm-product-sidebar .list-group-flush .list-group-item .fas,
.pm-product-sidebar .list-group-flush .list-group-item .far,
.pm-product-sidebar .list-group-flush .list-group-item .fal {
    width: 18px;
    text-align: center;
    color: #1e6bd6;
    flex-shrink: 0;
}

.pm-product-sidebar .list-group-flush .list-group-item:hover {
    background: #f0f4ff;
    color: #0b3d91;
    text-decoration: none;
}

.pm-product-sidebar .list-group-flush .list-group-item.active {
    background: #e8f0fe;
    color: #0b3d91;
    border-color: #f1f5f9;
    font-weight: 600;
}

.pm-product-sidebar .list-group-flush .list-group-item .sidebar-menu-item-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.pm-product-sidebar .list-group-flush .list-group-item .sidebar-menu-item-icon-wrapper {
    flex-shrink: 0;
}

.pm-product-sidebar .list-group-flush .list-group-item .sidebar-menu-item-icon {
    width: 18px;
    text-align: center;
    color: #1e6bd6;
}

.pm-product-sidebar .list-group-flush .list-group-item .sidebar-menu-item-label {
    flex: 1;
    min-width: 0;
}

.pm-product-sidebar .list-group-flush .list-group-item .sidebar-menu-item-badge {
    margin-left: auto;
}

.pm-product-sidebar .card-sidebar .card-footer {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 10px 16px;
    font-size: 0.875rem;
}

@media (max-width: 991.98px) {
    .pm-product-layout > .col-lg-8,
    .pm-product-layout > .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .pm-product-sidebar {
        position: static;
        margin-top: 16px;
    }
}

/* =====================================================
   SECURITY PAGE CARDS
   ===================================================== */
.pm-security-layout .pm-security-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pm-security-layout .pm-security-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.pm-security-layout .pm-security-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b3d91 0%, #1558b8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.pm-security-layout .pm-security-icon i {
    font-size: 1.4rem;
    color: #fff;
}

.pm-security-layout .pm-security-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.pm-security-layout .pm-security-card .text-muted {
    font-size: 0.8125rem;
    margin-bottom: 16px;
}

/* =====================================================
   DOMAIN DETAILS PAGE
   ===================================================== */
.pm-domain-layout {
    margin: 0 -8px;
}

.pm-domain-layout > [class*="col-"] {
    padding: 0 8px;
}

.pm-domain-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background: #fff;
    margin-bottom: 16px;
}

.pm-domain-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0b3d91;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.pm-domain-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0b3d91;
    margin-bottom: 16px;
}

.pm-domain-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.pm-domain-info-item {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.pm-domain-info-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.pm-domain-info-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.pm-domain-info-value {
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
}

.pm-domain-info-value a {
    color: #0b3d91;
    font-weight: 500;
}

.pm-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pm-status-badge.pm-status-active {
    background: #dcfce7;
    color: #166534;
}

.pm-status-badge.pm-status-pending,
.pm-status-badge.pm-status-grace,
.pm-status-badge.pm-status-redemption {
    background: #fef3c7;
    color: #92400e;
}

.pm-status-badge.pm-status-expired,
.pm-status-badge.pm-status-cancelled,
.pm-status-badge.pm-status-fraud,
.pm-status-badge.pm-status-transferredaway {
    background: #fee2e2;
    color: #991b1b;
}

/* Domain sidebar - reuse product sidebar patterns */
.pm-domain-sidebar {
    position: sticky;
    top: 16px;
}

.pm-domain-sidebar .card-sidebar {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background: #fff;
}

.pm-domain-sidebar .card-sidebar + .card-sidebar {
    margin-top: 12px;
}

.pm-domain-sidebar .card-sidebar .card-header {
    background: linear-gradient(135deg, #0b3d91 0%, #1558b8 100%);
    border: none;
    padding: 12px 16px;
    cursor: default;
}

.pm-domain-sidebar .card-sidebar .card-header .card-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
}

.pm-domain-sidebar .card-sidebar .card-header i {
    color: #fff;
}

.pm-domain-sidebar .card-sidebar .card-header .card-minimise {
    display: none;
}

.pm-domain-sidebar .card-sidebar .collapsable-card-body {
    display: block !important;
}

.pm-domain-sidebar .list-group-item {
    padding: 10px 16px;
    font-size: 0.9375rem;
    color: #334155;
    border-color: #f1f5f9;
    transition: background 0.15s, color 0.15s;
}

.pm-domain-sidebar .list-group-item:hover {
    background: #f0f4ff;
    color: #0b3d91;
}

.pm-domain-sidebar .list-group-item.active {
    background: #0b3d91;
    border-color: #0b3d91;
    color: #fff;
}

@media (max-width: 991.98px) {
    .pm-domain-layout > .col-lg-8,
    .pm-domain-layout > .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .pm-domain-sidebar {
        position: static;
        margin-top: 16px;
    }

    .pm-domain-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Domain sidebar panels - always visible and expanded */
#main-body .pm-domain-sidebar .card-sidebar,
#main-body .pm-domain-sidebar .pm-domain-manage-panel,
#main-body .pm-domain-sidebar .pm-domain-actions-panel {
    display: block !important;
}

.pm-domain-manage-panel .collapsable-card-body,
.pm-domain-actions-panel .collapsable-card-body {
    display: block !important;
}

.pm-domain-actions-panel {
    margin-top: 12px;
}

.pm-domain-sidebar .sidebar-menu-item-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-domain-sidebar .sidebar-menu-item-icon-wrapper {
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.pm-domain-sidebar .sidebar-menu-item-icon {
    color: #64748b;
    font-size: 0.9375rem;
}

.pm-domain-sidebar .list-group-item.active .sidebar-menu-item-icon {
    color: #fff;
}

.pm-domain-sidebar .sidebar-menu-item-label {
    font-size: 0.9375rem;
}

.pm-sidebar-back-btn {
    display: block;
    margin-top: 16px;
    padding: 10px 16px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #0b3d91;
    color: #0b3d91;
    background: #fff;
    text-align: center;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.pm-sidebar-back-btn:hover {
    background: #0b3d91;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(11, 61, 145, 0.25);
}

.pm-sidebar-back-btn i {
    font-size: 0.8rem;
}
