/*!
 * TeamCloud Modern — System Theme layout & page styles (tc-theme.css)
 * Depends on tc-core.css (design tokens + components) loaded before this file.
 */

/* ==========================================================================
   App shell
   ========================================================================== */
html { scroll-padding-top: calc(var(--tc-header-h) + 16px); }
body.tc-body { background: var(--tc-bg-secondary); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
.tc-container, .tc-body .container { width: 100%; max-width: var(--tc-container); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 575.98px) { .tc-container, .tc-body .container { padding-left: 16px; padding-right: 16px; } }

/* --------------------------------------------------------------------------
   App shell: left navigation rail + top bar + content (reference layout)
   -------------------------------------------------------------------------- */
:root { --tc-rail-w: 264px; --tc-aside-w: 320px; }
.tc-shell { display: flex; min-height: 100vh; width: 100%; }
.tc-shell__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 1200px) { .tc-shell__main { margin-left: var(--tc-rail-w); } }

/* Left navigation rail (desktop fixed, mobile off-canvas drawer) */
.tc-rail {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1045; width: var(--tc-rail-w);
    display: flex; flex-direction: column; background: var(--tc-bg-secondary);
    padding: 22px 16px 18px;
}
@media (max-width: 1199.98px) {
    .tc-rail { width: min(300px, 86vw); background: var(--tc-surface); box-shadow: var(--tc-shadow-lg); border-radius: 0 var(--tc-radius-xl) var(--tc-radius-xl) 0; transform: translateX(-104%); transition: transform 260ms cubic-bezier(.2,.8,.2,1); }
    body.tc-drawer-open .tc-rail { transform: none; }
}
.tc-drawer-backdrop { position: fixed; inset: 0; background: var(--tc-overlay); z-index: 1040; opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 220ms; }
body.tc-drawer-open { overflow: hidden; }
body.tc-drawer-open .tc-drawer-backdrop { opacity: 1; visibility: visible; }
.tc-rail__brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px 22px; }
.tc-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.1rem; color: var(--tc-text-primary); text-decoration: none; min-width: 0; }
.tc-brand:hover { color: var(--tc-text-primary); text-decoration: none; }
.tc-brand img { max-height: 36px; max-width: 170px; width: auto; }
.tc-brand img.tc-brand__logo { height: 36px; width: auto; max-width: 180px; }
.tc-brand .tc-brand__logo--dark { display: none; }
[data-theme="dark"] .tc-brand .tc-brand__logo--light { display: none; }
[data-theme="dark"] .tc-brand .tc-brand__logo--dark { display: inline-block; }
@media (max-width: 575.98px) { .tc-topbar__brand-mobile .tc-brand img.tc-brand__logo { height: 28px; } }
.tc-rail__scroll { flex: 1 1 auto; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.tc-rail__label { font-size: .7rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--tc-text-muted); padding: 16px 12px 6px; }
.tc-rail__search { margin-bottom: 12px; }
@media (min-width: 1200px) { .tc-rail__search { display: none; } }
.tc-rail__foot { padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }

/* Vertical primary navigation */
.tc-vnav { list-style: none; margin: 0; padding: 0; }
.tc-vnav__item { margin: 2px 0; }
.tc-vnav__link {
    display: flex; align-items: center; gap: .75rem; width: 100%;
    padding: .62rem .8rem; border-radius: 14px; border: 0; background: transparent; text-align: left;
    color: var(--tc-text-secondary); font-weight: 500; font-size: .92rem; text-decoration: none;
    transition: background-color var(--tc-transition), color var(--tc-transition), box-shadow var(--tc-transition);
}
.tc-vnav__link:hover, .tc-vnav__link:focus { color: var(--tc-text-primary); background: var(--tc-hover); text-decoration: none; }
.tc-vnav__item.is-active > .tc-vnav__link, .tc-vnav__link.active { background: var(--tc-surface); color: var(--tc-text-primary); box-shadow: var(--tc-shadow-sm); }
[data-theme="dark"] .tc-vnav__item.is-active > .tc-vnav__link { background: var(--tc-surface-raised); }
.tc-vnav__icon { width: 20px; text-align: center; font-size: 1rem; color: inherit; flex: none; }
.tc-vnav__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-vnav__caret { font-size: .78rem; color: var(--tc-text-muted); transition: transform var(--tc-transition); }
.tc-vnav__link[aria-expanded="true"] .tc-vnav__caret { transform: rotate(180deg); }
.tc-vnav__sub { list-style: none; margin: 2px 0 6px; padding: 0 0 0 2.05rem; position: relative; }
.tc-vnav__sub::before { content: ""; position: absolute; left: 1.28rem; top: 4px; bottom: 4px; width: 1px; background: var(--tc-divider); }
.tc-vnav__sub a { display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; border-radius: 10px; color: var(--tc-text-secondary); font-size: .87rem; text-decoration: none; }
.tc-vnav__sub a:hover { color: var(--tc-text-primary); background: var(--tc-hover); }
.tc-vnav__sub a.active { color: var(--tc-primary-text); font-weight: 500; }
.tc-vnav__sub .tc-vnav__divider { height: 1px; background: var(--tc-divider); margin: 6px .75rem; }

/* Theme switch (segmented, reference bottom-left) */
.tc-theme-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--tc-radius-pill); background: var(--tc-surface); box-shadow: var(--tc-shadow-sm); align-self: flex-start; }
[data-theme="dark"] .tc-theme-switch { background: var(--tc-surface-raised); border: 1px solid var(--tc-divider); }
.tc-theme-switch button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--tc-text-muted); display: inline-flex; align-items: center; justify-content: center; }
.tc-theme-switch button:hover { color: var(--tc-text-primary); }
.tc-theme-switch button[aria-pressed="true"] { background: var(--tc-bg-secondary); color: var(--tc-text-primary); box-shadow: var(--tc-shadow-sm); }
[data-theme="dark"] .tc-theme-switch button[aria-pressed="true"] { background: var(--tc-hover); }
.tc-rail__help { display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; border-radius: 14px; background: var(--tc-surface); box-shadow: var(--tc-shadow-sm); color: var(--tc-text-primary); font-size: .86rem; font-weight: 500; text-decoration: none; }
[data-theme="dark"] .tc-rail__help { background: var(--tc-surface-raised); border: 1px solid var(--tc-divider); }
.tc-rail__help:hover { text-decoration: none; color: var(--tc-primary-text); }

/* Admin masquerade bar */
.tc-admin-bar { background: var(--tc-text-primary); color: #fff; font-size: .82rem; }
[data-theme="dark"] .tc-admin-bar { background: #1E2A3E; }
.tc-admin-bar .tc-container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; flex-wrap: wrap; }
.tc-admin-bar a { color: #fff; font-weight: 500; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; padding: .2rem .7rem; border-radius: var(--tc-radius-pill); background: rgba(255,255,255,.12); }
.tc-admin-bar a:hover { background: rgba(255,255,255,.22); color: #fff; }

/* Top bar */
.tc-topbar {
    position: sticky; top: 0; z-index: 1030; background: var(--tc-header-bg);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    transition: box-shadow var(--tc-transition);
}
.tc-topbar.is-scrolled { box-shadow: 0 1px 0 var(--tc-divider); }
.tc-topbar__inner { display: flex; align-items: center; gap: 14px; min-height: var(--tc-header-h); }
.tc-icon-btn.tc-topbar__burger { display: none; }
@media (max-width: 1199.98px) { .tc-icon-btn.tc-topbar__burger { display: inline-flex; } }
.tc-topbar__brand-mobile { display: none; }
@media (max-width: 1199.98px) { .tc-topbar__brand-mobile { display: inline-flex; } .tc-topbar__brand-mobile img { max-height: 30px; } }
.tc-topbar__title { min-width: 0; flex: 1 1 auto; }
.tc-topbar__title .h1, .tc-topbar__title h1 { font-size: 1.55rem; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1199.98px) { .tc-topbar__title { display: none; } }
.tc-topbar__search { width: 280px; flex: none; }
.tc-topbar__search .form-control { min-height: 42px; background: var(--tc-surface); border-color: transparent; box-shadow: var(--tc-shadow-sm); }
[data-theme="dark"] .tc-topbar__search .form-control { border-color: var(--tc-divider); }
@media (max-width: 1199.98px) { .tc-topbar__search { display: none; } }
.tc-topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tc-topbar__cta { border-radius: var(--tc-radius-pill); padding: .55rem 1.2rem; }
@media (max-width: 575.98px) { .tc-topbar__cta { display: none; } }

/* Round icon buttons (reference: notifications / chat) */
.tc-icon-btn {
    position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tc-surface); color: var(--tc-text-secondary); font-size: 1rem; cursor: pointer;
    box-shadow: var(--tc-shadow-sm); transition: background-color var(--tc-transition), color var(--tc-transition), box-shadow var(--tc-transition);
}
[data-theme="dark"] .tc-icon-btn { background: var(--tc-surface-raised); border: 1px solid var(--tc-divider); }
.tc-icon-btn:hover, .tc-icon-btn:focus, .show > .tc-icon-btn { color: var(--tc-text-primary); box-shadow: var(--tc-shadow-md); text-decoration: none; }
.tc-icon-btn--plain { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 14px; }
.tc-icon-btn--plain:hover { background: var(--tc-hover) !important; }
.tc-icon-btn__count {
    position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--tc-primary); color: #fff; font-size: .66rem; font-weight: 600; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--tc-bg-secondary);
}
.tc-icon-btn__count--danger { background: var(--tc-danger); }
.tc-icon-btn__count:empty, .tc-icon-btn__count[data-count="0"] { display: none; }

/* Account (secondary navbar) trigger */
.tc-account { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
.tc-account > li > a {
    display: inline-flex; align-items: center; gap: .55rem; padding: 3px; border-radius: var(--tc-radius-pill);
    background: var(--tc-surface); box-shadow: var(--tc-shadow-sm); color: var(--tc-text-primary);
    font-weight: 500; font-size: .88rem; text-decoration: none; max-width: 220px;
}
[data-theme="dark"] .tc-account > li > a { background: var(--tc-surface-raised); border: 1px solid var(--tc-divider); }
.tc-account > li > a.tc-account__guest { padding: .5rem 1rem; }
.tc-account > li > a:hover, .tc-account > li.show > a { box-shadow: var(--tc-shadow-md); text-decoration: none; color: var(--tc-text-primary); }
.tc-account > li > a.dropdown-toggle::after { display: none; }
.tc-account__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 10px; }
@media (max-width: 767.98px) { .tc-account__label { display: none; } }
.tc-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tc-primary); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
}
.tc-avatar--sm { width: 30px; height: 30px; font-size: .7rem; }
.tc-avatar--lg { width: 48px; height: 48px; font-size: 1rem; }
.tc-account .dropdown-menu { min-width: 270px; }
.tc-account__head { padding: .6rem .8rem .75rem; border-bottom: 1px solid var(--tc-divider); margin-bottom: 6px; display: flex; gap: .75rem; align-items: center; }
.tc-account__head .tc-grow { min-width: 0; }
.tc-account__head strong { display: block; font-size: .92rem; }
.tc-account__head .tc-grow span { font-size: .8rem; color: var(--tc-text-secondary); display: block; }

/* Notifications dropdown */
.tc-notifications { width: 360px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.tc-notifications__head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; border-bottom: 1px solid var(--tc-divider); font-weight: 600; }
.tc-notifications__list { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.tc-notifications__list a { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .7rem; border-radius: 12px; color: var(--tc-text-primary); text-decoration: none; font-size: .86rem; line-height: 1.45; }
.tc-notifications__list a:hover { background: var(--tc-hover); }
.tc-notifications__list .tc-icon-tile { width: 32px; height: 32px; border-radius: 10px; font-size: .85rem; }
.tc-notifications__empty { padding: 1.6rem 1rem; text-align: center; color: var(--tc-text-secondary); font-size: .88rem; }

/* Network issues / verification banners */
.tc-banner { margin-top: 16px; }
.tc-banner .alert { margin: 0; display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; box-shadow: var(--tc-shadow-sm); }
.verification-banner { background: transparent; padding: 0; margin-top: 16px; }
.verification-banner .tc-banner-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.1rem; border-radius: var(--tc-radius-md); background: var(--tc-warning-light); border: 1px solid rgba(217,119,6,.22); }
.verification-banner .tc-banner-card .tc-grow { font-size: .9rem; }
.verification-banner .btn-close-banner, .verification-banner .tc-banner-close { background: transparent; border: 0; color: var(--tc-text-secondary); }

/* Main area */
.tc-main { flex: 1 0 auto; padding: 8px 0 56px; }
.tc-shell .tc-container { max-width: 1440px; padding-left: 28px; padding-right: 28px; }
@media (max-width: 575.98px) { .tc-shell .tc-container { padding-left: 16px; padding-right: 16px; } }
.tc-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 22px; }
.tc-page-head__title { margin: .3rem 0 0; font-size: clamp(1.45rem, 1.2rem + .8vw, 1.85rem); }
@media (min-width: 1200px) { .tc-page-head--compact .tc-page-head__title { display: none; } }
.tc-page-head__tagline { margin: .3rem 0 0; color: var(--tc-text-secondary); font-size: .95rem; max-width: 720px; }
.tc-page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Content + contextual right column (WHMCS primary/secondary sidebars) */
.tc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.tc-layout--aside { grid-template-columns: minmax(0, 1fr) var(--tc-aside-w); }
.tc-layout--aside .tc-aside { grid-column: 2; grid-row: 1; }
.tc-layout--aside .tc-content { grid-column: 1; grid-row: 1; }
@media (max-width: 991.98px) {
    .tc-layout--aside { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .tc-layout--aside .tc-aside, .tc-layout--aside .tc-content { grid-column: 1; grid-row: auto; }
}
.tc-content { min-width: 0; }
.tc-aside { position: sticky; top: calc(var(--tc-header-h) + 12px); min-width: 0; }
@media (max-width: 991.98px) { .tc-aside { position: static; } .tc-aside__secondary { display: none; } }
.tc-aside-mobile-secondary { margin-top: 8px; }
@media (min-width: 992px) { .tc-aside-mobile-secondary { display: none; } }

/* Sidebar cards (WHMCS primary/secondary sidebars) */
.card-sidebar { border-radius: var(--tc-radius-lg); margin-bottom: 18px; overflow: hidden; }
.card-sidebar .card-header { padding: .9rem 1.15rem; border-bottom: 1px solid var(--tc-divider); cursor: default; }
.card-sidebar .card-title { font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: .55rem; }
.card-sidebar .card-title > i:first-child { color: var(--tc-primary-text); width: 18px; text-align: center; }
.card-sidebar .card-minimise { margin-left: auto; cursor: pointer; color: var(--tc-text-muted); font-size: .8rem; transition: transform var(--tc-transition); width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.card-sidebar .card-minimise:hover { background: var(--tc-hover); color: var(--tc-text-primary); }
.card-sidebar .card-minimise.minimised { transform: rotate(180deg); }
@media (min-width: 992px) { .card-sidebar .card-minimise { display: none; } }
.card-sidebar .card-title .badge { margin-left: auto; }
.card-sidebar .card-body { padding: 1rem 1.15rem; font-size: .88rem; }
.card-sidebar .list-group { padding: 6px; }
.card-sidebar .list-group-item { border: 0; border-radius: 11px !important; padding: .58rem .75rem; font-size: .88rem; color: var(--tc-text-secondary); margin: 1px 0; }
.card-sidebar .list-group-item:hover { color: var(--tc-text-primary); }
.card-sidebar .list-group-item.active { background: var(--tc-primary-light); color: var(--tc-primary-text); font-weight: 500; }
.card-sidebar .list-group-item.active .sidebar-menu-item-icon { color: var(--tc-primary-text); }
.sidebar-menu-item-wrapper { display: flex; align-items: center; gap: .6rem; }
.sidebar-menu-item-icon-wrapper { width: 18px; text-align: center; flex: none; }
.sidebar-menu-item-icon { color: var(--tc-text-muted); }
.sidebar-menu-item-label { flex: 1 1 auto; min-width: 0; }
.sidebar-menu-item-badge .badge { font-size: .7rem; }
.card-sidebar .card-footer { padding: .8rem 1.15rem; font-size: .85rem; }
.card-sidebar .card-footer .btn { width: 100%; }
.card-sidebar .list-group-item .badge { float: none; }
.card-sidebar .list-group-item > .badge.float-right { float: right; }

/* Footer */
.tc-footer { padding: 28px 0 32px; margin-top: auto; border-top: 1px solid var(--tc-divider); }
.tc-footer__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.tc-footer__links { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.tc-footer__links a { color: var(--tc-text-secondary); font-size: .88rem; text-decoration: none; }
.tc-footer__links a:hover { color: var(--tc-primary-text); }
.tc-footer__copy { color: var(--tc-text-muted); font-size: .82rem; margin: 14px 0 0; }
.tc-footer__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-social { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tc-social a { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--tc-text-secondary); background: var(--tc-surface); box-shadow: var(--tc-shadow-sm); }
.tc-social a:hover { color: var(--tc-primary-text); }
.tc-locale-btn { display: inline-flex; align-items: center; gap: .5rem; border: 0; background: var(--tc-surface); box-shadow: var(--tc-shadow-sm); border-radius: var(--tc-radius-pill); padding: .45rem .95rem; font-size: .85rem; color: var(--tc-text-primary); }
[data-theme="dark"] .tc-locale-btn { border: 1px solid var(--tc-divider); background: var(--tc-surface-raised); }
.tc-locale-btn:hover { box-shadow: var(--tc-shadow-md); }
.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 1000; width: 44px; height: 44px; border-radius: 50%; background: var(--tc-surface); box-shadow: var(--tc-shadow-lg); color: var(--tc-text-primary); display: none; align-items: center; justify-content: center; }
.back-to-top.is-visible { display: inline-flex; }

/* Minimal layout (login, password reset, 2FA) */
.tc-minimal { min-height: 100vh; display: flex; flex-direction: column; }
.tc-minimal__top { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px; }
.tc-minimal__main { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tc-minimal__main > .tc-minimal__inner { width: 100%; max-width: 1040px; }
.tc-minimal .tc-footer { border-top: 0; text-align: center; }
.tc-minimal .tc-footer__grid { justify-content: center; }

/* Localisation modal */
.modal-localisation .modal-content { border-radius: var(--tc-radius-xl); }
.item-selector { margin: 0 -6px; }
.item-selector > div { padding: 6px; }
.item-selector .item { display: block; padding: .65rem .9rem; border-radius: 12px; border: 1px solid var(--tc-divider); color: var(--tc-text-primary); font-size: .9rem; text-decoration: none; text-align: center; }
.item-selector .item:hover { border-color: var(--tc-outline); background: var(--tc-hover); }
.item-selector .item.active { border-color: var(--tc-primary); background: var(--tc-primary-light); color: var(--tc-primary-text); font-weight: 500; }

/* ==========================================================================
   Dashboard (clientareahome)
   ========================================================================== */
.tc-welcome {
    position: relative; overflow: hidden; border-radius: var(--tc-radius-xl);
    padding: 32px; margin-bottom: 24px; background: var(--tc-surface); box-shadow: var(--tc-shadow-md);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
[data-theme="dark"] .tc-welcome { border: 1px solid var(--tc-divider); }
.tc-welcome::after { content: ""; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, var(--tc-primary-light) 0%, transparent 70%); pointer-events: none; }
.tc-welcome__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 600; margin: .25rem 0 .35rem; }
.tc-welcome__text { color: var(--tc-text-secondary); margin: 0; }
.tc-welcome__actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }

.tc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
@media (max-width: 1199.98px) { .tc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479.98px) { .tc-stats { grid-template-columns: 1fr; gap: 12px; } }
.tc-stat { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--tc-radius-lg); background: var(--tc-surface); box-shadow: var(--tc-shadow-md); color: var(--tc-text-primary); text-decoration: none; transition: box-shadow var(--tc-transition), transform var(--tc-transition); }
[data-theme="dark"] .tc-stat { border: 1px solid var(--tc-divider); }
.tc-stat:hover { box-shadow: var(--tc-shadow-lg); transform: translateY(-2px); text-decoration: none; color: var(--tc-text-primary); }
.tc-stat__top { display: flex; align-items: center; justify-content: space-between; }
.tc-stat__value { font-size: 2rem; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.tc-stat__label { color: var(--tc-text-secondary); font-size: .9rem; margin-top: 4px; }
.tc-stat__arrow { color: var(--tc-text-muted); transition: transform var(--tc-transition), color var(--tc-transition); }
.tc-stat:hover .tc-stat__arrow { color: var(--tc-primary-text); transform: translateX(3px); }

.tc-quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tc-quick-action { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--tc-radius-md); border: 1px solid var(--tc-divider); color: var(--tc-text-primary); font-weight: 500; font-size: .88rem; text-decoration: none; background: var(--tc-surface); transition: all var(--tc-transition); }
.tc-quick-action:hover { border-color: var(--tc-primary); background: var(--tc-primary-light); color: var(--tc-primary-text); text-decoration: none; }

.client-home-cards .card { margin-bottom: 24px; }
.client-home-cards .card-header { display: flex; align-items: center; }
.client-home-cards .card-title { display: flex; align-items: center; gap: .55rem; flex: 1 1 auto; }
.client-home-cards .card-title > i { color: var(--tc-primary-text); }
.client-home-cards .card-title .float-right { order: 9; margin-left: auto; float: none !important; }
.client-home-cards .card-title .btn { box-shadow: none; }
.client-home-cards .list-group { padding: 6px; }
.client-home-cards .list-group-item { border: 0; border-radius: 12px !important; font-size: .9rem; }
.client-home-cards .list-group-item small, .client-home-cards .list-group-item .text-last-updated { color: var(--tc-text-secondary); }
.client-home-cards .card-body { font-size: .92rem; }
.client-home-cards .card-body .form-control { margin-bottom: .5rem; }
.client-home-cards .card-footer { font-size: .85rem; }
.client-home-cards .label, .client-home-cards .status { float: right; }

/* ==========================================================================
   Lists of services/domains/invoices (filters + table cards)
   ========================================================================== */
.tc-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tc-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.view-filter-btns .list-group-item { display: flex; align-items: center; gap: .55rem; }
.view-filter-btns .list-group-item i.far { font-size: .7rem; color: var(--tc-text-muted); }
.view-filter-btns .list-group-item.active i { color: var(--tc-primary-text); }
.view-filter-btns .list-group-item .badge { margin-left: auto; }
.tc-service-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tc-service-cell__name { font-weight: 500; color: var(--tc-text-primary); }
.tc-service-cell__meta { font-size: .82rem; color: var(--tc-text-secondary); }
.tc-amount { font-weight: 500; white-space: nowrap; }
.tc-cycle { font-size: .8rem; color: var(--tc-text-secondary); display: block; }
.tc-row-link { color: var(--tc-text-primary); font-weight: 500; }
.tc-table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.ssl-state { display: inline-flex; width: 20px; justify-content: center; }
.ssl-state img { height: 16px; }

/* Responsive "card rows" for small screens */
@media (max-width: 767.98px) {
    .tc-stack-table thead { display: none; }
    .tc-stack-table, .tc-stack-table tbody, .tc-stack-table tr, .tc-stack-table td { display: block; width: 100%; }
    .tc-stack-table tr { padding: 12px 16px; border-top: 1px solid var(--tc-divider); }
    .tc-stack-table tr:first-child { border-top: 0; }
    .tc-stack-table td { border: 0 !important; padding: 4px 0 !important; text-align: left !important; }
    .tc-stack-table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tc-text-muted); }
}

/* ==========================================================================
   Service / Domain details
   ========================================================================== */
.tc-hero-card { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.tc-hero-card__main { display: flex; gap: 18px; align-items: center; min-width: 0; }
.tc-hero-card__title { font-size: 1.35rem; font-weight: 600; margin: 0; }
.tc-hero-card__sub { color: var(--tc-text-secondary); margin: .2rem 0 0; font-size: .92rem; word-break: break-all; }
.tc-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.tc-metric { padding: 16px 18px; border-radius: var(--tc-radius-md); background: var(--tc-surface-sunken); border: 1px solid var(--tc-divider); }
.tc-metric__label { font-size: .78rem; color: var(--tc-text-secondary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.tc-metric__value { font-weight: 600; font-size: 1rem; word-break: break-word; }
.product-status { border-radius: var(--tc-radius-lg); padding: 24px; text-align: center; background: var(--tc-surface-sunken); }
.product-status .product-icon { font-size: 2.2rem; color: var(--tc-primary-text); margin-bottom: 10px; }
.product-status-text { display: inline-block; margin-top: 8px; padding: .3rem .8rem; border-radius: var(--tc-radius-pill); font-size: .8rem; font-weight: 500; background: var(--tc-neutral-light); }
.product-status-active .product-status-text { background: var(--tc-success-light); color: var(--tc-success); }
.product-status-pending .product-status-text { background: var(--tc-warning-light); color: var(--tc-warning); }
.product-status-suspended .product-status-text, .product-status-terminated .product-status-text, .product-status-cancelled .product-status-text, .product-status-fraud .product-status-text { background: var(--tc-danger-light); color: var(--tc-danger); }
.module-client-area { margin-top: 8px; }
.module-client-area .btn { margin: 2px; }
.tc-module-output { overflow-x: auto; }
.tc-module-output .card { box-shadow: none; border-color: var(--tc-divider); }
.div-service-item { cursor: pointer; }
.tc-progress-label { display: flex; justify-content: space-between; font-size: .82rem; color: var(--tc-text-secondary); margin-bottom: 6px; }

/* ==========================================================================
   Support
   ========================================================================== */
.tc-thread { position: relative; }
.ticket-reply, .tc-reply { position: relative; border-radius: var(--tc-radius-lg); background: var(--tc-surface); box-shadow: var(--tc-shadow-md); margin-bottom: 18px; overflow: hidden; }
[data-theme="dark"] .ticket-reply, [data-theme="dark"] .tc-reply { border: 1px solid var(--tc-divider); }
.ticket-reply.staff, .tc-reply--staff { box-shadow: var(--tc-shadow-md), inset 3px 0 0 var(--tc-primary); }
.tc-reply__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--tc-divider); flex-wrap: wrap; }
.tc-reply__who { font-weight: 600; font-size: .95rem; }
.tc-reply__role { font-size: .75rem; }
.tc-reply__date { margin-left: auto; font-size: .82rem; color: var(--tc-text-secondary); }
.tc-reply__body { padding: 20px; font-size: .95rem; line-height: 1.7; word-wrap: break-word; overflow-x: auto; }
.tc-reply__body img { max-width: 100%; height: auto; }
.tc-reply__attachments { padding: 14px 20px; border-top: 1px dashed var(--tc-divider); background: var(--tc-surface-sunken); font-size: .85rem; }
.tc-reply__attachments a { display: inline-flex; gap: .4rem; align-items: center; margin: 2px 10px 2px 0; }
.tc-reply__foot { padding: 10px 20px; border-top: 1px solid var(--tc-divider); font-size: .82rem; color: var(--tc-text-secondary); }
.ticket-reply .rating span.star, .ticketfeedbackrating .star { cursor: pointer; color: var(--tc-outline); font-size: 1.1rem; }
.ticket-reply .rating span.star.active, .ticket-reply .rating span.star:hover, .ticket-reply .rating span.star:hover ~ span.star { color: var(--tc-warning); }
.ticket-reply .rating { direction: rtl; unicode-bidi: bidi-override; display: inline-block; }
.requestor-type-operator .tc-avatar { background: var(--tc-primary); }
.requestor-type-owner .tc-avatar, .requestor-type-registereduser .tc-avatar { background: #475569; }
.requestor-type-guest .tc-avatar, .requestor-type-subaccount .tc-avatar, .requestor-type-authorizeduser .tc-avatar { background: #64748B; }
.tc-file-upload .custom-file-label, .custom-file-label { border-color: var(--tc-outline); border-radius: var(--tc-radius-md); background: var(--tc-surface); color: var(--tc-text-secondary); min-height: 44px; padding: .6rem .9rem; }
.custom-file-label::after { height: auto; top: 0; bottom: 0; display: flex; align-items: center; background: var(--tc-surface-sunken); color: var(--tc-text-primary); border-left-color: var(--tc-outline); border-radius: 0 var(--tc-radius-md) var(--tc-radius-md) 0; }
.custom-file { min-height: 44px; }
.custom-file-input { min-height: 44px; }
.tc-dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

/* Knowledgebase / announcements / downloads */
.tc-kb-search { position: relative; max-width: 640px; }
.tc-kb-search .form-control { min-height: 54px; border-radius: var(--tc-radius-pill); padding-left: 3rem; padding-right: 8rem; background: var(--tc-surface); box-shadow: var(--tc-shadow-md); border-color: transparent; }
.tc-kb-search > i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--tc-text-muted); }
.tc-kb-search .btn { position: absolute; right: 6px; top: 6px; bottom: 6px; border-radius: var(--tc-radius-pill); }
.tc-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tc-cat { display: flex; gap: 14px; padding: 20px; border-radius: var(--tc-radius-lg); background: var(--tc-surface); box-shadow: var(--tc-shadow-md); color: var(--tc-text-primary); text-decoration: none; transition: all var(--tc-transition); }
[data-theme="dark"] .tc-cat { border: 1px solid var(--tc-divider); }
.tc-cat:hover { box-shadow: var(--tc-shadow-lg); transform: translateY(-2px); color: var(--tc-text-primary); text-decoration: none; }
.tc-cat__title { font-weight: 600; margin: 0 0 .2rem; font-size: .98rem; }
.tc-cat__desc { color: var(--tc-text-secondary); font-size: .86rem; margin: 0; }
.tc-article-list { list-style: none; margin: 0; padding: 6px; }
.tc-article-list > li > a, .kb-article-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; color: var(--tc-text-primary); text-decoration: none; }
.tc-article-list > li > a:hover, .kb-article-item:hover { background: var(--tc-hover); text-decoration: none; color: var(--tc-text-primary); }
.tc-article-list__title { font-weight: 500; }
.tc-article-list__excerpt { color: var(--tc-text-secondary); font-size: .86rem; margin-top: 2px; }
.tc-prose { font-size: 1rem; line-height: 1.75; color: var(--tc-text-primary); word-wrap: break-word; }
.tc-prose h1, .tc-prose h2, .tc-prose h3 { margin-top: 1.6em; margin-bottom: .6em; }
.tc-prose img { max-width: 100%; height: auto; border-radius: var(--tc-radius-md); }
.tc-prose table { width: 100%; margin-bottom: 1rem; }
.tc-prose table td, .tc-prose table th { border: 1px solid var(--tc-divider); padding: .5rem .75rem; }
.tc-prose blockquote { border-left: 3px solid var(--tc-primary); padding-left: 1rem; color: var(--tc-text-secondary); }
.tc-announcement { padding: 24px; }
.tc-announcement__date { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 62px; border-radius: 16px; background: var(--tc-primary-light); color: var(--tc-primary-text); flex: none; line-height: 1.1; }
.tc-announcement__date strong { font-size: 1.25rem; }
.tc-announcement__date span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }

/* ==========================================================================
   Billing / invoices
   ========================================================================== */
.tc-summary { background: var(--tc-surface); border-radius: var(--tc-radius-lg); box-shadow: var(--tc-shadow-md); padding: 22px; }
.tc-summary__row { display: flex; justify-content: space-between; gap: 12px; padding: .45rem 0; font-size: .92rem; }
.tc-summary__row span:first-child { color: var(--tc-text-secondary); }
.tc-summary__total { border-top: 1px solid var(--tc-divider); margin-top: .5rem; padding-top: .85rem; font-size: 1.15rem; font-weight: 600; }
.tc-summary__total span:first-child { color: var(--tc-text-primary); }
.invoice-summary-table td, .invoice-summary-table th { padding: .7rem 1rem; }
#payMethodList .paymethod-info, .tc-paymethod { display: flex; align-items: center; gap: .75rem; }
.tc-paymethod-card { border: 1px solid var(--tc-divider); border-radius: var(--tc-radius-md); padding: 14px 16px; transition: all var(--tc-transition); }
.tc-paymethod-card:hover { border-color: var(--tc-outline); }
.cc-payment-form, .auth3d-area { background: var(--tc-surface); border-radius: var(--tc-radius-lg); }
.submit-3d iframe, .auth3d-area iframe { border: 0; width: 100%; min-height: 420px; border-radius: var(--tc-radius-md); background: #fff; }
.iframe-input-container { border-radius: var(--tc-radius-md); border: 1px solid var(--tc-outline); padding: .45rem .9rem; min-height: 44px; background: var(--tc-surface); }

/* ==========================================================================
   Authentication pages
   ========================================================================== */
.tc-auth { display: flex; justify-content: center; padding: 16px 0 32px; }
.tc-auth__card { width: 100%; max-width: 460px; padding: 40px; border-radius: var(--tc-radius-xl); background: var(--tc-surface); box-shadow: var(--tc-shadow-lg); }
[data-theme="dark"] .tc-auth__card { border: 1px solid var(--tc-divider); }
.tc-auth__card--wide { max-width: 920px; }
@media (max-width: 575.98px) { .tc-auth__card { padding: 26px 20px; border-radius: var(--tc-radius-lg); } }
.tc-auth__icon { margin-bottom: 18px; }
.tc-auth__title { font-size: 1.6rem; font-weight: 600; margin: 0 0 .35rem; }
.tc-auth__text { color: var(--tc-text-secondary); margin-bottom: 26px; }
.tc-auth__foot { text-align: center; margin-top: 22px; font-size: .9rem; color: var(--tc-text-secondary); }
.tc-auth__divider { display: flex; align-items: center; gap: 12px; color: var(--tc-text-muted); font-size: .8rem; margin: 22px 0; text-transform: uppercase; letter-spacing: .08em; }
.tc-auth__divider::before, .tc-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--tc-divider); }
.tc-password-field { position: relative; }
.tc-password-field .form-control { padding-right: 3rem; }
.tc-password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--tc-text-muted); }
.tc-password-toggle:hover { background: var(--tc-hover); color: var(--tc-text-primary); }
.social-signin-btns { display: grid; gap: 10px; }
.social-signin-btns .btn { width: 100%; }
.btn-social { border: 1px solid var(--tc-outline); background: var(--tc-surface); color: var(--tc-text-primary); }
.btn-social:hover { background: var(--tc-hover); }
.btn-facebook { color: #1877F2; }
.btn-twitter { color: #1DA1F2; }
.providerLinkingFeedback, .providerPreLinking { font-size: .88rem; }
.twofa-module { border: 1px solid var(--tc-divider); border-radius: var(--tc-radius-md); padding: 16px; margin-bottom: 12px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.twofa-module.active, .twofa-module:hover { border-color: var(--tc-primary); background: var(--tc-primary-light); }
.twofa-setup .qr-code img, .twofa-setup img { background: #fff; padding: 8px; border-radius: 12px; }
.captchaimage img { border-radius: var(--tc-radius-sm); border: 1px solid var(--tc-divider); }
.recaptcha-container { display: flex; justify-content: center; margin: 1rem 0; }

/* User switch account */
.select-account .list-group-item, .tc-account-option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px !important; border: 1px solid var(--tc-divider) !important; margin-bottom: 10px; color: var(--tc-text-primary); background: var(--tc-surface); }
.select-account .list-group-item:hover, .tc-account-option:hover { border-color: var(--tc-primary) !important; background: var(--tc-primary-light); }
.select-account .list-group-item.disabled { opacity: .6; }
.invite-box { border-radius: var(--tc-radius-xl); }

/* ==========================================================================
   Domain search (homepage), domain pricing
   ========================================================================== */
.tc-hero { border-radius: var(--tc-radius-xl); padding: clamp(28px, 4vw, 56px); background: var(--tc-surface); box-shadow: var(--tc-shadow-md); margin-bottom: 32px; position: relative; overflow: hidden; }
[data-theme="dark"] .tc-hero { border: 1px solid var(--tc-divider); }
.tc-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 240px at 90% -10%, var(--tc-primary-light), transparent 70%); pointer-events: none; }
.tc-hero > * { position: relative; }
.tc-hero__title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: .5rem; }
.tc-hero__text { color: var(--tc-text-secondary); font-size: 1.02rem; max-width: 620px; }
.tc-domain-search { display: flex; gap: 8px; padding: 8px; border-radius: var(--tc-radius-lg); background: var(--tc-surface); border: 1px solid var(--tc-outline); max-width: 760px; box-shadow: var(--tc-shadow-sm); }
.tc-domain-search:focus-within { border-color: var(--tc-focus); box-shadow: var(--tc-focus-ring); }
.tc-domain-search .form-control { border: 0; box-shadow: none !important; background: transparent; font-size: 1rem; min-height: 48px; }
.tc-domain-search .btn { flex: none; }
@media (max-width: 575.98px) { .tc-domain-search { flex-wrap: wrap; } .tc-domain-search .btn { flex: 1 1 auto; } }
.featured-tlds-container, .tc-tld-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.featured-tld, .tc-tld-chip { display: inline-flex; align-items: baseline; gap: .45rem; padding: .45rem .85rem; border-radius: var(--tc-radius-pill); background: var(--tc-surface-sunken); border: 1px solid var(--tc-divider); font-size: .85rem; }
.featured-tld .img-container img { max-height: 18px; }
.featured-tld .price, .tc-tld-chip span { color: var(--tc-text-secondary); }
.domain-pricing .tld-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.domain-pricing .tld-filters a.badge { padding: .45rem .9rem; font-size: .82rem; cursor: pointer; background: var(--tc-surface); border: 1px solid var(--tc-divider); color: var(--tc-text-secondary); }
.domain-pricing .tld-filters a.badge-success { background: var(--tc-primary); border-color: var(--tc-primary); color: #fff; }
.tld-sale-group { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .45rem; border-radius: var(--tc-radius-pill); margin-left: .35rem; }
.tld-sale-group-hot { background: var(--tc-danger-light); color: var(--tc-danger); }
.tld-sale-group-new { background: var(--tc-success-light); color: var(--tc-success); }
.tld-sale-group-sale { background: var(--tc-warning-light); color: var(--tc-warning); }
.domain-pricing .tld-row.no-tlds { display: none; }

/* Homepage product groups */
.tc-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* MarketConnect promos */
.promo-banner, .mc-promo-manage, .mc-panel-promo { border-radius: var(--tc-radius-lg) !important; overflow: hidden; }
.promo-container { border-radius: var(--tc-radius-lg); background: var(--tc-surface); box-shadow: var(--tc-shadow-md); padding: 24px; margin-bottom: 24px; }
#mc-promo-widgets .card { box-shadow: var(--tc-shadow-md); }

/* Affiliates */
.affiliate-stat { padding: 20px; border-radius: var(--tc-radius-lg); background: var(--tc-surface); box-shadow: var(--tc-shadow-md); text-align: center; }
.affiliate-stat span { display: block; font-size: 1.8rem; font-weight: 600; color: var(--tc-text-primary); }

/* Server status */
.network-issue-alert { border-radius: var(--tc-radius-md); }
.tc-status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--tc-neutral); }
.tc-status-dot--up { background: var(--tc-success); box-shadow: 0 0 0 4px var(--tc-success-light); }
.tc-status-dot--down { background: var(--tc-danger); box-shadow: 0 0 0 4px var(--tc-danger-light); }

/* Steps (ticket submission, upgrade, SSL configuration) */
.tc-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; flex-wrap: wrap; }
.tc-steps li { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--tc-text-muted); font-weight: 500; }
.tc-steps li + li::before { content: ""; width: 28px; height: 1px; background: var(--tc-divider); }
.tc-steps__num { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tc-divider); font-size: .78rem; }
.tc-steps li.is-active { color: var(--tc-text-primary); }
.tc-steps li.is-active .tc-steps__num { background: var(--tc-primary); border-color: var(--tc-primary); color: #fff; }
.tc-steps li.is-done .tc-steps__num { background: var(--tc-success-light); border-color: transparent; color: var(--tc-success); }

/* Error pages */
.tc-error { text-align: center; padding: 48px 16px; max-width: 560px; margin: 0 auto; }
.tc-error__code { font-size: clamp(3.5rem, 2rem + 6vw, 6rem); font-weight: 700; letter-spacing: -.04em; color: var(--tc-primary-text); line-height: 1; }

/* Sitejet / misc legacy compatibility */
.tiles { display: none; } /* legacy Twenty-One tiles markup is not used by this theme */
.small-font { font-size: .82rem; }
.line-height-reduced { line-height: 1.2; }
.input-inline { display: inline-block; width: auto; }
.input-inline-100 { display: inline-block; width: 100px; }
.width-fixed-20 { width: 20px; }
.width-fixed-60 { width: 60px; }
.w-text-09 { font-size: .9rem; }
.primary-bg-color { background-color: var(--tc-bg-secondary); }
.btn-return-to-admin { position: fixed; bottom: 20px; left: 20px; z-index: 1050; background: var(--tc-text-primary); color: #fff; border-radius: var(--tc-radius-pill); box-shadow: var(--tc-shadow-lg); }
.btn-return-to-admin:hover { color: #fff; background: #000; }
.copy-to-clipboard { cursor: pointer; }
.markdown-content, .markdown-content p { word-wrap: break-word; }
.ssl-inactive { opacity: .6; }

@media print {
    .tc-header, .tc-footer, .tc-sidebar, .tc-drawer, .tc-admin-bar, .tc-page-head__actions, .back-to-top { display: none !important; }
    .tc-layout--sidebar { grid-template-columns: 1fr; }
    body.tc-body { background: #fff; }
    .card, .tc-card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* Active products/services panel rows (includes/active-products-services-item.tpl) */
.div-service-item.tc-service-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; transition: background-color var(--tc-transition); flex-wrap: wrap; }
.div-service-item.tc-service-row:hover { background: var(--tc-hover); }
.tc-service-row .div-service-name { order: 1; flex: 1 1 200px; min-width: 0; }
.tc-service-row .div-service-status { order: 2; }
.tc-service-row .div-service-buttons { order: 3; display: flex; gap: 6px; flex-wrap: wrap; }
.div-service-status { position: relative; }
.div-service-status .label-placeholder { position: absolute; visibility: hidden; }
.div-service-buttons .btn-group-secondary { display: none; }
@media (min-width: 768px) {
    .div-service-buttons .btn-group-primary { display: none; }
    .div-service-buttons .btn-group-secondary { display: inline-flex; }
}
.tc-service-row .btn { box-shadow: none; }
.tc-service-row .text-domain { color: var(--tc-text-secondary); }

/* ==========================================================================
   TeamCloud corporate footer (includes/tc-footer.tpl)
   ========================================================================== */
.tc-footer--brand { background: var(--tc-surface); border-top: 0; padding: 56px 0 76px; box-shadow: 0 -1px 0 var(--tc-divider); }
.tc-footer__statement { max-width: 1040px; font-size: .92rem; line-height: 1.8; color: var(--tc-text-secondary); margin: 0 0 40px; }
.tc-footer__main { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; }
@media (max-width: 991.98px) { .tc-footer__main { grid-template-columns: 1fr; gap: 32px; } }
.tc-footer__logo { display: inline-block; }
.tc-footer__logo-img { width: 190px; height: auto; }
.tc-footer__logo-img--dark { display: none; }
[data-theme="dark"] .tc-footer__logo-img--light { display: none; }
[data-theme="dark"] .tc-footer__logo-img--dark { display: inline; }
.tc-footer__address { font-style: normal; font-size: .9rem; line-height: 1.75; color: var(--tc-text-primary); margin: 22px 0 16px; }
.tc-footer__contact { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: .9rem; margin: 0 0 22px; }
.tc-footer__contact dt { font-weight: 400; color: var(--tc-text-secondary); }
.tc-footer__contact dd { margin: 0; }
.tc-footer__contact a { color: var(--tc-text-primary); text-decoration: none; }
.tc-footer__contact a:hover { color: var(--tc-primary-text); }
.tc-footer__iso { width: 160px; height: auto; display: block; margin-bottom: 20px; }
[data-theme="dark"] .tc-footer__iso { background: #fff; border-radius: 12px; padding: 6px 10px; box-sizing: content-box; width: 140px; }
.tc-footer__social { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tc-footer__social a { display: inline-flex; border-radius: 10px; transition: transform var(--tc-transition), opacity var(--tc-transition); }
.tc-footer__social a:hover { transform: translateY(-2px); opacity: .8; }
.tc-footer__social img { width: 34px; height: 34px; }
[data-theme="dark"] .tc-footer__social img { filter: invert(1); }
.tc-footer__social-label { margin-top: 8px; font-weight: 600; font-size: .9rem; }
.tc-footer__heading { font-size: 1.45rem; font-weight: 500; margin: 0 0 6px; padding-bottom: 14px; border-bottom: 1px solid var(--tc-divider); }
.tc-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 32px; margin-top: 22px; }
.tc-footer__cols--secondary { margin-top: 36px; }
.tc-footer__col-title {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    background: none; border: 0; padding: 0; margin: 0 0 10px; text-align: left;
    font-family: var(--tc-font); font-size: 1.1rem; font-weight: 500; color: var(--tc-text-primary); cursor: default;
}
.tc-footer__col-title--rule { padding-bottom: 6px; border-bottom: 1px solid var(--tc-divider); }
.tc-footer__list { list-style: none; padding: 0; margin: 0; }
.tc-footer__list li { margin: 0 0 8px; }
.tc-footer__list a { color: var(--tc-text-secondary); font-size: .9rem; line-height: 1.45; text-decoration: none; transition: color var(--tc-transition); }
.tc-footer__list a:hover { color: var(--tc-primary-text); }
@media (min-width: 768px) {
    .tc-footer__list.collapse:not(.show), .tc-footer__list.collapsing { display: block !important; height: auto !important; }
    .tc-footer__col-title { pointer-events: none; }
}
@media (max-width: 767.98px) {
    .tc-footer__cols { grid-template-columns: 1fr; gap: 0; margin-top: 8px; }
    .tc-footer__cols--secondary { margin-top: 0; }
    .tc-footer__col { border-bottom: 1px solid var(--tc-divider); }
    .tc-footer__col-title, .tc-footer__col-title--rule { cursor: pointer; padding: 14px 0; margin: 0; border-bottom: 0; font-size: 1rem; }
    .tc-footer__col-title::after { content: "\f107"; font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free"; font-weight: 300; transition: transform var(--tc-transition); }
    .tc-footer__col-title:not(.collapsed)::after { transform: rotate(180deg); }
    .tc-footer__list { padding-bottom: 12px; }
}
.tc-footer__subscribe {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center;
    margin-top: 48px; padding: 24px 28px; border-radius: var(--tc-radius-xl); background: var(--tc-surface-sunken); border: 1px solid var(--tc-divider);
}
@media (max-width: 991.98px) { .tc-footer__subscribe { grid-template-columns: 1fr; } }
.tc-footer__subscribe-title { font-size: 1.25rem; font-weight: 600; margin: 0; }
.tc-footer__subscribe-text { margin: 4px 0 0; color: var(--tc-text-secondary); font-size: .9rem; }
.tc-footer__subscribe-form { display: flex; gap: 10px; }
.tc-footer__subscribe-form .form-control { flex: 1 1 0; min-width: 0; background: var(--tc-surface); }
.tc-footer__subscribe-form .btn { flex: none; }
@media (max-width: 575.98px) { .tc-footer__subscribe-form { flex-direction: column; } }
.tc-footer__payments { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--tc-divider); }
@media (max-width: 991.98px) { .tc-footer__payments { grid-template-columns: 1fr; } }
.tc-footer__payments-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 4px; }
.tc-footer__payments-text p { margin: 0; color: var(--tc-text-secondary); font-size: .85rem; }
.tc-footer__pay-list { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; list-style: none; padding: 0; margin: 0; }
.tc-footer__pay-list img { height: 26px; width: auto; filter: brightness(0) saturate(0); opacity: .55; transition: opacity var(--tc-transition); }
.tc-footer__pay-list img:hover { opacity: .85; }
[data-theme="dark"] .tc-footer__pay-list img { filter: none; opacity: .7; }
.tc-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--tc-divider); }
.tc-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .82rem; color: var(--tc-text-muted); }
.tc-footer__legal a { color: var(--tc-text-secondary); text-decoration: none; }
.tc-footer__legal a:hover { color: var(--tc-primary-text); }
.tc-footer__rights { color: var(--tc-text-muted); }

/* Header dropdowns on phones: pin full-width under the top bar so they never leave the viewport */
@media (max-width: 575.98px) {
    .tc-topbar .dropdown-menu { position: fixed !important; left: 12px !important; right: 12px !important; top: calc(var(--tc-header-h) - 6px) !important; width: auto !important; max-width: none !important; transform: none !important; }
}

/* whmcs.js / cart JS collapse sidebar panels when no Bootstrap ".container" exists (this layout has none).
   The minimise control is hidden on desktop, so keep every sidebar panel open there. */
@media (min-width: 992px) {
    .card-sidebar .collapsable-card-body, .panel-sidebar .collapsable-card-body { display: block !important; }
}
