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

    ** Custom Stylesheet **

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

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

/* =====================================================
   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: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
    box-shadow: 2px 0 14px rgba(11, 61, 145, 0.15);
}

.ca-left-nav::-webkit-scrollbar {
    width: 4px;
}

.ca-left-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* 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-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;
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    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;
    }

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

@media (min-width: 992px) {
    /* 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%;
    }
}

/* ── 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;
}

/* 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;
}

/* Collapse toggle — half-pill shape protruding from the right edge of the sidebar */
.ca-sidebar-collapse-toggle {
    position: fixed;
    bottom: 16px;
    top: auto;
    left: 240px;
    width: 14px;
    height: 28px;
    border-radius: 0 14px 14px 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-left: none;
    color: #1e6bd6;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 0 10px rgba(11, 61, 145, 0.15);
    transition: background 0.15s, color 0.15s, left 0.28s cubic-bezier(0.4,0,0.2,1), width 0.15s;
    z-index: 1055;
    padding: 0;
}

/* When sidebar is collapsed, move toggle along with it */
body.ca-sidebar-collapsed .ca-sidebar-collapse-toggle {
    left: 72px;
}

/* Hide toggle on mobile (uses hamburger instead) */
@media (max-width: 991px) {
    .ca-sidebar-collapse-toggle {
        display: none;
    }
}

.ca-sidebar-collapse-toggle:hover {
    background: #eff6ff;
    color: #1e6bd6;
    width: 18px;
}

.ca-sidebar-collapse-toggle:active {
    background: #dbeafe;
}

.ca-sidebar-collapse-toggle .ca-sidebar-collapse-icon {
    font-size: 0.95rem;
    transition: transform 0.25s ease;
    margin-left: 2px;
}

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

/* 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 ── */
@media (min-width: 992px) {
    body.ca-sidebar-collapsed .ca-nav-section-toggle,
    body.ca-sidebar-collapsed .ca-nav-section-caret {
        display: none !important;
    }

    body.ca-sidebar-collapsed .ca-nav-group.is-closed .ca-nav-collapse {
        max-height: 2000px !important;
        opacity: 1 !important;
    }
}

@media (min-width: 992px) {
    body.ca-sidebar-collapsed .ca-left-nav {
        width: 72px;
    }

    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;
    }

    body.ca-sidebar-collapsed .ca-nav-label,
    body.ca-sidebar-collapsed .ca-nav-badge,
    body.ca-sidebar-collapsed .ca-nav-section,
    body.ca-sidebar-collapsed .ca-nav-brand-text,
    body.ca-sidebar-collapsed .ca-nav-status {
        display: none !important;
    }

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

    body.ca-sidebar-collapsed .ca-nav-brand img {
        max-height: 28px;
    }

    body.ca-sidebar-collapsed .ca-nav-link {
        justify-content: center;
        padding: 0.6rem 0.4rem;
    }

    body.ca-sidebar-collapsed .ca-nav-list {
        padding: 0.25rem 0.45rem;
    }

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

    /* Tooltip-style label on hover when collapsed */
    body.ca-sidebar-collapsed .ca-nav-link {
        position: relative;
    }

    body.ca-sidebar-collapsed .ca-nav-link:hover::after {
        content: attr(aria-label);
    }
}

/* Hide sidebar collapse toggle on small screens (mobile uses bottom-left hamburger) */
@media (max-width: 991px) {
    .ca-sidebar-collapse-toggle {
        display: none;
    }
}

/* =====================================================
   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.72rem;
    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.7rem;
}

.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.7rem;
    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.72rem;
    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.72rem;
    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;
}

/* 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.72rem;
    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.68rem;
    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.78rem;
    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-brand {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e6bd6 0%, #0b3d91 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    letter-spacing: -0.02em;
}
.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.78rem;
}
.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; }
    .ca-mobile-topbar { display: flex; }
    .ca-mobile-bottombar { display: flex; }
    .ca-content-wrap { padding-bottom: 72px; }
    .ca-nav-toggle { display: none !important; }
}

@media (min-width: 768px) {
    .ca-mobile-topbar,
    .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 LOGO FLIP CARD
   ===================================================== */

.ca-brand-flip-link {
    display: block;
    padding: 0 !important;
    border-bottom: none !important;
    text-decoration: none !important;
}

.ca-brand-flipcard {
    width: 100%;
    height: 100px;
    perspective: 800px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-sizing: border-box;
}

.ca-brand-flipcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.ca-brand-flipcard-inner.is-flipped {
    transform: rotateX(180deg);
}

.ca-brand-flipcard-front,
.ca-brand-flipcard-back {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.ca-brand-flipcard-front img {
    max-height: 40px;
    width: auto;
    max-width: 100%;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

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

.ca-brand-flipcard-back {
    transform: rotateX(180deg);
    flex-direction: column;
    gap: 0.25rem;
    background: transparent;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    text-align: center;
    border: none;
}

.ca-brand-flip-icon {
    display: none;
}

.ca-brand-flip-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}

.ca-brand-flip-sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.3;
    max-width: 160px;
    text-align: center;
}

.ca-brand-flip-cta {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 0.03em;
    margin-top: 0.15rem;
}

@media (max-width: 991px) {
    .ca-brand-flip-link,
    .ca-brand-flipcard {
        display: none;
    }
}

body.ca-sidebar-collapsed .ca-brand-flipcard {
    padding: 0.5rem 0.35rem;
    height: 64px;
}

body.ca-sidebar-collapsed .ca-brand-flip-title,
body.ca-sidebar-collapsed .ca-brand-flip-sub,
body.ca-sidebar-collapsed .ca-brand-flip-cta {
    display: none;
}

body.ca-sidebar-collapsed .ca-brand-flipcard-back {
    padding: 0.25rem;
}
