/* =====================================================================
   Tokyonline theme layer (loaded after theme.min.css + base.css)
   - Exactly two palettes: light and dark. Appearance is auto (default,
     follows prefers-color-scheme live), light or dark, stored by
     assets/js/tk-ui.js and set on <html data-tk-theme> before first
     paint (header.tpl). Every dark rule therefore has two forms:
       @media (prefers-color-scheme: dark) { html:not([data-tk-theme="light"]) ... }
       html[data-tk-theme="dark"] ...
   - Shared components for public pages, client area, cart and auth.
   - RTL support for Persian via [dir="rtl"], with LTR isolation for
     identifiers (.tk-ltr / bdi).
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    color-scheme: light dark;
    --tk-bg: #f4f5f7;
    --tk-surface: #ffffff;
    --tk-surface-2: #f8f9fb;
    --tk-surface-3: #eef0f4;
    --tk-border: #e1e4ea;
    --tk-border-strong: #cdd2da;
    --tk-text: #1d2027;
    --tk-text-2: #3a404b;
    --tk-muted: #5c6370;
    --tk-primary: #3755be;
    --tk-primary-hover: #2c47a6;
    --tk-primary-soft: #e9edfb;
    --tk-on-primary: #ffffff;
    --tk-link: #2f4bb0;
    --tk-success: #1d7f46;
    --tk-success-soft: #e3f4ea;
    --tk-danger: #c0332b;
    --tk-danger-soft: #fbe9e7;
    --tk-info: #1f6fb2;
    --tk-info-soft: #e5f0fa;
    --tk-amber: #b86e00;
    --tk-amber-soft: #fff4e0;
    --tk-amber-border: #f0b44c;
    --tk-amber-text: #6b4100;
    --tk-header: #16181d;
    --tk-header-2: #1f2228;
    --tk-header-border: rgba(255, 255, 255, .08);
    --tk-header-text: #eceef2;
    --tk-header-muted: #a9afba;
    --tk-focus: #3755be;
    --tk-shadow: 0 1px 2px rgba(17, 19, 24, .05), 0 6px 20px rgba(17, 19, 24, .06);
    --tk-shadow-lg: 0 10px 40px rgba(17, 19, 24, .14);
    --tk-radius: 12px;
    --tk-radius-sm: 8px;
    --tk-font: "Inter UI", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --tk-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-tk-theme="light"] { color-scheme: light; }
:root[data-tk-theme="dark"] { color-scheme: dark; }

/* Dark tokens, part 1/2: auto mode on a dark OS (keep in sync with part 2 below) */
@media (prefers-color-scheme: dark) {
    :root:not([data-tk-theme="light"]) {
        --tk-bg: #111317;
        --tk-surface: #1a1d22;
        --tk-surface-2: #20242a;
        --tk-surface-3: #282c33;
        --tk-border: #2d3239;
        --tk-border-strong: #3b414a;
        --tk-text: #e7e9ed;
        --tk-text-2: #c9cdd4;
        --tk-muted: #a1a8b3;
        --tk-primary: #7590ff;
        --tk-primary-hover: #91a6ff;
        --tk-primary-soft: #232b48;
        --tk-on-primary: #0c1022;
        --tk-link: #9db0ff;
        --tk-success: #5cc98a;
        --tk-success-soft: #173325;
        --tk-danger: #ff8a80;
        --tk-danger-soft: #3a1d1b;
        --tk-info: #7cc0f5;
        --tk-info-soft: #172b3d;
        --tk-amber: #f5b54a;
        --tk-amber-soft: #2e2412;
        --tk-amber-border: #8f6519;
        --tk-amber-text: #f8d38f;
        --tk-header: #0b0c0f;
        --tk-header-2: #15171b;
        --tk-header-border: rgba(255, 255, 255, .07);
        --tk-header-text: #eceef2;
        --tk-header-muted: #9ea4ae;
        --tk-focus: #9db0ff;
        --tk-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .25);
        --tk-shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    }
}
/* Dark tokens, part 2/2: explicit dark choice (same values as part 1) */
:root[data-tk-theme="dark"] {
    --tk-bg: #111317;
    --tk-surface: #1a1d22;
    --tk-surface-2: #20242a;
    --tk-surface-3: #282c33;
    --tk-border: #2d3239;
    --tk-border-strong: #3b414a;
    --tk-text: #e7e9ed;
    --tk-text-2: #c9cdd4;
    --tk-muted: #a1a8b3;
    --tk-primary: #7590ff;
    --tk-primary-hover: #91a6ff;
    --tk-primary-soft: #232b48;
    --tk-on-primary: #0c1022;
    --tk-link: #9db0ff;
    --tk-success: #5cc98a;
    --tk-success-soft: #173325;
    --tk-danger: #ff8a80;
    --tk-danger-soft: #3a1d1b;
    --tk-info: #7cc0f5;
    --tk-info-soft: #172b3d;
    --tk-amber: #f5b54a;
    --tk-amber-soft: #2e2412;
    --tk-amber-border: #8f6519;
    --tk-amber-text: #f8d38f;
    --tk-header: #0b0c0f;
    --tk-header-2: #15171b;
    --tk-header-border: rgba(255, 255, 255, .07);
    --tk-header-text: #eceef2;
    --tk-header-muted: #9ea4ae;
    --tk-focus: #9db0ff;
    --tk-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .25);
    --tk-shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
}

/* ---------- 2. Base ---------- */
html.tk-html { background: var(--tk-bg); }
.tk-body {
    background: var(--tk-bg);
    color: var(--tk-text);
    font-family: var(--tk-font);
    border-top: 0;
    min-width: 0;
}
.tk-html:lang(zh-TW) .tk-body { font-family: "Inter UI", -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif; }
.tk-html:lang(ko) .tk-body { font-family: "Inter UI", -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
.tk-html:lang(fa) .tk-body { font-family: Vazirmatn, "Vazir", Tahoma, "Segoe UI", "Noto Sans Arabic", sans-serif; }
.tk-html:lang(ja) .tk-body { font-family: "Inter UI", -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif; }

.tk-body h1, .tk-body h2, .tk-body h3, .tk-body h4, .tk-body h5, .tk-body h6,
.tk-body .h1, .tk-body .h2, .tk-body .h3, .tk-body .h4, .tk-body .h5, .tk-body .h6 { color: var(--tk-text); }
.tk-body a { color: var(--tk-link); }
.tk-body a:hover { color: var(--tk-primary-hover); }
.tk-body .text-muted { color: var(--tk-muted) !important; }
.tk-body .text-body, .tk-body .text-dark { color: var(--tk-text) !important; }
.tk-body .text-primary { color: var(--tk-primary) !important; }
.tk-body .bg-white, .tk-body .bg-light { background-color: var(--tk-surface) !important; }
.tk-body .bg-primary-alt { background-color: var(--tk-surface-2) !important; }
.tk-body .border, .tk-body .border-top, .tk-body .border-bottom { border-color: var(--tk-border) !important; }
.tk-body hr { border-color: var(--tk-border); }
.tk-body code, .tk-body pre, .tk-body kbd { font-family: var(--tk-mono); }
.tk-body pre, .tk-body .well { background: var(--tk-surface-2); color: var(--tk-text); border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm); }
.tk-body ::selection { background: var(--tk-primary); color: var(--tk-on-primary); }
.tk-body img { max-width: 100%; }

/* Accessible focus (base.css removes outlines with :focus{outline:none}) */
.tk-body :focus-visible { outline: 2px solid var(--tk-focus); outline-offset: 2px; box-shadow: none; }
.tk-body .btn:focus-visible, .tk-body .form-control:focus-visible { outline: 2px solid var(--tk-focus); outline-offset: 2px; }
.tk-body .form-control:focus { border-color: var(--tk-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-primary) 22%, transparent); }
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    .tk-body .form-control:focus { box-shadow: 0 0 0 3px rgba(55, 85, 190, .25); }
}
#tk-main:focus { outline: none; }

.tk-skip {
    position: absolute; z-index: 2000; top: 8px; inset-inline-start: 8px;
    padding: 10px 16px; border-radius: var(--tk-radius-sm);
    background: var(--tk-primary); color: var(--tk-on-primary) !important; font-weight: 600;
    transform: translateY(-160%); transition: transform .15s ease;
}
.tk-skip:focus { transform: translateY(0); outline: 2px solid var(--tk-on-primary); outline-offset: -4px; }

/* LTR isolation for identifiers: domains, IPs, emails, invoice/ticket numbers, usernames */
.tk-ltr, bdi[dir="ltr"] { direction: ltr; unicode-bidi: isolate; }
.tk-num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }

/* ---------- 3. Buttons ---------- */
.tk-body .btn { border-radius: var(--tk-radius-sm); font-weight: 600; }
.tk-body .btn-primary {
    background-color: var(--tk-primary); border-color: var(--tk-primary); color: var(--tk-on-primary);
}
.tk-body .btn-primary:hover, .tk-body .btn-primary:focus, .tk-body .btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--tk-primary-hover); border-color: var(--tk-primary-hover); color: var(--tk-on-primary);
}
.tk-body .btn-outline-primary { color: var(--tk-primary); border-color: var(--tk-primary); background: transparent; }
.tk-body .btn-outline-primary:hover { background: var(--tk-primary); color: var(--tk-on-primary); }
.tk-body .btn-default, .tk-body .btn-white, .tk-body .btn-light, .tk-body .btn-secondary {
    background-color: var(--tk-surface); color: var(--tk-text); border: 1px solid var(--tk-border-strong);
}
.tk-body .btn-default:hover, .tk-body .btn-white:hover, .tk-body .btn-light:hover, .tk-body .btn-secondary:hover {
    background-color: var(--tk-surface-3); color: var(--tk-text); border-color: var(--tk-border-strong);
}
.tk-body .btn-link { color: var(--tk-link); }
.tk-body .btn-success { background-color: var(--tk-success); border-color: var(--tk-success); color: #fff; }
.tk-body .btn-danger { background-color: var(--tk-danger); border-color: var(--tk-danger); color: #fff; }
@media (prefers-color-scheme: dark) {
    html:not([data-tk-theme="light"]) .tk-body .btn-success, html:not([data-tk-theme="light"]) .tk-body .btn-danger { color: #111317; }
}
html[data-tk-theme="dark"] .tk-body .btn-success, html[data-tk-theme="dark"] .tk-body .btn-danger { color: #111317; }

/* ---------- 4. Header (dark charcoal in both palettes) ---------- */
.tk-header-wrap { position: sticky; top: 0; z-index: 1030; }
.tk-header { background: var(--tk-header); border-bottom: 1px solid var(--tk-header-border); }
.tk-header .tk-navbar { background: transparent; padding-top: .5rem; padding-bottom: .5rem; border: 0; position: relative; }
.tk-header .tk-brand { padding: 0; margin-inline-end: 1.5rem; display: inline-flex; align-items: center; }
.tk-header .tk-brand img, .tk-header .tk-brand svg { width: 132px; height: auto; max-height: 48px; }
.tk-header .tk-nav { margin-inline-end: auto; }
.tk-header .nav-link, .tk-header .tk-nav__btn {
    color: var(--tk-header-text) !important; opacity: .86;
    font-size: 15px; font-weight: 600; padding: .6rem .8rem !important;
    background: none; border: 0; border-radius: var(--tk-radius-sm); line-height: 1.4;
}
.tk-header .nav-link:hover, .tk-header .tk-nav__btn:hover, .tk-header .show > .tk-nav__btn { opacity: 1; background: rgba(255, 255, 255, .06); }
.tk-body .tk-header .navbar .dropdown-toggle::after,
.tk-body .tk-subnav .navbar .dropdown-toggle::after {
    display: inline-block !important; content: ""; width: 0; height: 0;
    border-top: .3em solid; border-right: .3em solid transparent; border-left: .3em solid transparent; border-bottom: 0;
    margin-left: 0; margin-inline-start: .4em; vertical-align: .15em; opacity: .7;
}
.tk-header .dropdown-menu {
    background: var(--tk-header-2); border: 1px solid var(--tk-header-border); border-radius: var(--tk-radius);
    box-shadow: var(--tk-shadow-lg); padding: .4rem; margin-top: .35rem; min-width: 14rem;
    width: auto; max-width: min(92vw, 22rem); text-align: start;
}
.tk-header .dropdown-item { color: var(--tk-header-text); border-radius: 6px; padding: .55rem .8rem; font-size: 14px; white-space: normal; }
.tk-header .dropdown-item:hover, .tk-header .dropdown-item:focus, .tk-header .dropdown-item.active { background: rgba(255, 255, 255, .08); color: #fff; }
.tk-header .tk-menu-rich .dropdown-item { display: flex; gap: .75rem; align-items: flex-start; min-width: 17rem; }
.tk-header .tk-menu-rich .dropdown-item i { margin-top: .2rem; color: var(--tk-header-muted); }
.tk-header .tk-menu-rich strong { display: block; font-weight: 600; }
.tk-header .tk-menu-rich small { display: block; color: var(--tk-header-muted); font-size: 12px; }
.tk-header__actions { display: flex; align-items: center; gap: .375rem; flex: 0 0 auto; }
/* Square icon buttons in the top row: language, appearance, cart */
.tk-icon-link,
.tk-header .tk-lang__toggle,
.tk-theme__toggle {
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--tk-radius-sm);
    background: transparent; color: var(--tk-header-text) !important; font-size: 16px; cursor: pointer;
}
.tk-icon-link:hover, .tk-header .tk-lang__toggle:hover, .tk-theme__toggle:hover,
.tk-theme.show > .tk-theme__toggle { background: rgba(255, 255, 255, .08); }
.tk-count {
    position: absolute; top: 3px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--tk-amber); color: #16181d; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.tk-header .tk-btn-console { white-space: nowrap; }
.tk-toggler { border: 0 !important; padding: .5rem; width: 44px; height: 44px; border-radius: var(--tk-radius-sm); }
.tk-toggler:hover { background: rgba(255, 255, 255, .08); }
.tk-burger, .tk-burger::before, .tk-burger::after, .tk-burger > span {
    display: block; width: 22px; height: 2px; background: var(--tk-header-text); border-radius: 2px; position: relative; transition: transform .2s ease, opacity .2s ease;
}
.tk-burger { background: transparent; margin: 0 auto; }
.tk-burger::before, .tk-burger::after { content: ""; position: absolute; inset-inline-start: 0; }
.tk-burger::before { top: -7px; }
.tk-burger::after { top: 7px; }
.tk-toggler[aria-expanded="true"] .tk-burger > span { opacity: 0; }
.tk-toggler[aria-expanded="true"] .tk-burger::before { transform: translateY(7px) rotate(45deg); }
.tk-toggler[aria-expanded="true"] .tk-burger::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobile-only console button inside the collapsed menu (top-row button is hidden below 576px) */
.tk-header__menu-cta { display: none; }

/* Expanded (>= 1200px, navbar-expand-xl): one row, nothing wraps.
   DOM order is brand, actions, toggler, menu (so phones tab through the top row first);
   on desktop the menu is placed visually between brand and actions. */
@media (min-width: 1200px) {
    .tk-header .tk-navbar > .container { flex-wrap: nowrap; max-width: min(100%, 1320px); }
    .tk-header .tk-nav { padding-inline-start: 0; }
    .tk-header .tk-brand { order: 0; margin-inline-end: 1rem; }
    .tk-header .navbar-collapse { order: 1; min-width: 0; }
    .tk-header .tk-header__actions { order: 2; margin-inline-start: .75rem; }
    .tk-header .tk-lang__toggle { width: auto; padding-inline: .5rem; font-size: 14px; white-space: nowrap; }
    .tk-header .tk-nav { flex-wrap: nowrap; }
    .tk-header .nav-link, .tk-header .tk-nav__btn { font-size: 14px; padding: .6rem .6rem !important; white-space: nowrap; }
}

/* Collapsed (< 1200px: tablets and phones): brand | actions | toggler, menu below */
@media (max-width: 1199.98px) {
    .tk-header .tk-navbar > .container { flex-wrap: wrap; }
    .tk-header .tk-brand { margin-inline-end: 0; }
    .tk-header .tk-header__actions { margin-inline-start: auto; }
    .tk-header .tk-toggler { margin-inline-start: .375rem; }
    .tk-header .navbar-collapse { flex-basis: 100%; padding: .5rem 0 1rem; max-height: calc(100vh - 70px); overflow-y: auto; }
    .tk-header .tk-nav { margin: 0; }
    .tk-header .nav-link, .tk-header .tk-nav__btn { width: 100%; text-align: start; }
    .tk-header .navbar-collapse .dropdown-menu { position: static; float: none; box-shadow: none; margin: 0 0 .25rem; border: 0; background: rgba(255, 255, 255, .04); max-width: none; }
}
@media (max-width: 575.98px) {
    .tk-header .tk-header__actions .tk-btn-console { display: none; }
    .tk-header__menu-cta { display: block; padding-top: .75rem; margin-top: .5rem; border-top: 1px solid var(--tk-header-border); }
    .tk-header .tk-header__actions { gap: .125rem; }
}
@media (max-width: 359.98px) {
    .tk-header .tk-brand img, .tk-header .tk-brand svg { width: 108px; }
    .tk-icon-link, .tk-header .tk-lang__toggle, .tk-theme__toggle { width: 36px; }
}

/* ---------- 5. Language / currency dialog and appearance menu ---------- */
/* The native WHMCS chooser lists every installed pack; tk-ui.js removes it, this hides it until then. */
#modalChooseLanguage { display: none !important; }

/* Labelled triggers (footer, auth). The header trigger is an icon button (section 4). */
.tk-lang { position: relative; }
.tk-lang__toggle {
    display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 .8rem;
    border-radius: var(--tk-radius-sm); border: 1px solid var(--tk-header-border);
    background: transparent; color: var(--tk-header-text); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tk-lang__toggle:hover { background: rgba(255, 255, 255, .08); }
.tk-lang__cur { padding-inline-start: .45rem; border-inline-start: 1px solid var(--tk-header-border); color: var(--tk-header-muted); font-weight: 500; }
.tk-lang--footer { margin-top: 1rem; display: inline-block; }

.tk-locale .modal-dialog { max-width: 34rem; }
.tk-locale .modal-header { align-items: center; }
.tk-body .tk-locale__title { margin: 0; font-size: 18px; font-weight: 700; color: var(--tk-text); }
.tk-locale__group { min-width: 0; margin: 0 0 1.25rem; padding: 0; border: 0; }
.tk-locale__group:last-child { margin-bottom: 0; }
.tk-body .tk-locale__legend { float: none; width: auto; margin-bottom: .5rem; padding: 0; font-size: 13px; font-weight: 700; color: var(--tk-muted); }
.tk-locale__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 576px) { .tk-locale__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tk-body .tk-locale__opt { position: relative; display: block; margin: 0; cursor: pointer; color: var(--tk-text); }
/* Visually hidden but focusable: arrow keys move within each radio group */
.tk-locale__input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.tk-locale__box {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
    min-height: 52px; padding: .55rem 2rem .55rem .8rem; padding-inline: .8rem 2rem;
    border: 1px solid var(--tk-border-strong); border-radius: var(--tk-radius-sm);
    background: var(--tk-surface); color: var(--tk-text); font-size: 15px; font-weight: 600; line-height: 1.3;
}
.tk-locale__name { unicode-bidi: isolate; }
.tk-locale__opt:hover .tk-locale__box { border-color: var(--tk-primary); }
.tk-locale__input:checked + .tk-locale__box { border-color: var(--tk-primary); background: var(--tk-primary-soft); box-shadow: inset 0 0 0 1px var(--tk-primary); }
.tk-locale__input:checked + .tk-locale__box::after {
    content: ""; position: absolute; top: 50%; inset-inline-end: .8rem; width: 6px; height: 11px; margin-top: -7px;
    border: solid var(--tk-primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.tk-locale__input:focus-visible + .tk-locale__box { outline: 2px solid var(--tk-focus); outline-offset: 2px; }
.tk-body .tk-locale__opt.is-unavailable { cursor: not-allowed; }
.tk-locale__opt.is-unavailable .tk-locale__box { border-style: dashed; border-color: var(--tk-border-strong); background: var(--tk-surface-2); color: var(--tk-text-2); }
.tk-locale__badge { font-size: 12px; font-weight: 600; color: var(--tk-muted); }
.tk-locale__note, .tk-locale__static { margin: .6rem 0 0; font-size: 13px; color: var(--tk-muted); }
.tk-locale__static { margin: 0; font-size: 14px; color: var(--tk-text-2); }
.tk-locale .modal-footer { gap: .5rem; }
.tk-locale .modal-footer > * { margin: 0; }

/* Appearance menu */
.tk-theme { position: relative; }
.tk-body .tk-theme .tk-theme__menu { top: 100%; inset-inline-start: auto; inset-inline-end: 0; min-width: 11rem; margin-top: .35rem; padding: .4rem; }
.tk-theme__menu .dropdown-item { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: none; text-align: start; cursor: pointer; }
.tk-theme__menu .dropdown-item[aria-checked="true"] { font-weight: 700; }
.tk-theme__menu .dropdown-item[aria-checked="true"]::after {
    content: ""; width: 5px; height: 10px; margin-inline-start: auto; margin-top: -3px;
    border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Auth pages (login / register / reset / logout): always on the dark auth backdrop */
.tk-auth-bar { position: absolute; top: 0; inset-inline: 0; z-index: 20; padding: 12px 0; }
.tk-auth-bar__inner { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.tk-auth-bar .tk-lang__toggle, .tk-auth-bar .tk-theme__toggle { background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .18); }
.tk-auth-bar .tk-lang__toggle:hover, .tk-auth-bar .tk-theme__toggle:hover { background: rgba(0, 0, 0, .4); }

/* ---------- 6. Client sub-navigation ---------- */
.tk-subnav { background: var(--tk-surface); border-bottom: 1px solid var(--tk-border); }
.tk-subnav .navbar { padding: 0; background: transparent !important; }
.tk-subnav .navbar-nav { flex-direction: row; flex-wrap: wrap; }
.tk-subnav .nav-link {
    color: var(--tk-text-2) !important; font-size: 14px !important; font-weight: 600;
    padding: .9rem .85rem !important; border-bottom: 2px solid transparent;
}
.tk-subnav .nav-link:hover, .tk-subnav .show > .nav-link { color: var(--tk-text) !important; border-bottom-color: var(--tk-border-strong); }
.tk-subnav .nav-item.active > .nav-link { border-bottom-color: var(--tk-primary); color: var(--tk-text) !important; }
.tk-subnav .navbar-nav .nav-item:first-child { margin-left: 0; margin-inline-start: -.85rem; }
.tk-subnav .dropdown-menu { position: absolute; }
.tk-subnav .navbar-nav li .dropdown-toggle { background-image: none; padding-inline-end: .85rem; }
.tk-subnav .nav-link .badge { margin-inline-start: .35rem; }
.tk-subnav .navbar-nav .nav-divider { border-color: var(--tk-border); }
@media (max-width: 991.98px) {
    .tk-subnav .container { flex-wrap: wrap; }
    .tk-subnav .nav-link { padding: .7rem .6rem !important; }
    .tk-subnav .navbar-nav .nav-item:first-child { margin-inline-start: -.6rem; }
    .tk-subnav .tk-subnav__secondary { width: 100%; border-top: 1px solid var(--tk-border); }
    .tk-subnav .dropdown-menu { max-width: 92vw; }
}

/* ---------- 7. Shared surfaces ---------- */
.tk-body .main-body { background: var(--tk-bg); padding: 40px 0 56px; }
.tk-body .main-header { margin-bottom: 28px; }
.tk-body .main-header .header-lined h1 { color: var(--tk-text); font-size: 28px; line-height: 1.25; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.tk-body .main-header .header-lined p, .tk-pagehead__desc { color: var(--tk-muted); padding-top: 6px; }
.tk-body .main-header .breadcrumb li a { color: var(--tk-muted); }
.tk-body .main-header .breadcrumb li.active { color: var(--tk-text-2); }
.tk-body .breadcrumb { background: transparent; }
.tk-body .breadcrumb-item, .tk-body .breadcrumb-item a { color: var(--tk-muted); }

.tk-body .card,
.tk-body .panel,
.tk-body .tile,
.tk-body .logincontainer,
.tk-body .table-container,
.tk-body .invoice,
.tk-body .ticket-reply,
.tk-body .product-details,
.tk-body .message {
    background-color: var(--tk-surface);
    border-color: var(--tk-border);
    color: var(--tk-text);
}
.tk-body .card, .tk-body .panel { border-radius: var(--tk-radius); box-shadow: var(--tk-shadow); }
.tk-body .card { border: 1px solid var(--tk-border); }
.tk-body .panel-heading, .tk-body .panel-default > .panel-heading, .tk-body .card-header {
    background-color: var(--tk-surface-2); border-color: var(--tk-border); color: var(--tk-text);
    border-top-left-radius: calc(var(--tk-radius) - 1px); border-top-right-radius: calc(var(--tk-radius) - 1px);
}
.tk-body .panel-title { color: var(--tk-text); }
.tk-body .panel-footer, .tk-body .card-footer { background-color: var(--tk-surface-2); border-color: var(--tk-border); }
.tk-body .panel-form { background: var(--tk-surface-2); }
.tk-body .client-home-panels .panel > .panel-heading { background: var(--tk-surface); border-color: var(--tk-border); }
.tk-body .client-home-panels .panel > .panel-heading .panel-title { color: var(--tk-text); }
.tk-body .client-home-panels .panel .list-group .list-group-item { border-color: var(--tk-border); }
.tk-body .client-home-panels .panel-accent-emerald, .tk-body .client-home-panels .panel-accent-emerald .panel-heading { background: var(--tk-surface); }
.tk-body .client-home-panels .panel-accent-emerald .panel-footer { background: var(--tk-surface-2); }

.tk-body .list-group-item { background-color: var(--tk-surface); border-color: var(--tk-border); color: var(--tk-text); }
.tk-body a.list-group-item:hover, .tk-body .list-group-item-action:hover { background-color: var(--tk-surface-2); color: var(--tk-text); }
.tk-body .list-group-item.active { background-color: var(--tk-primary-soft); border-color: var(--tk-border); color: var(--tk-text); box-shadow: inset 3px 0 0 var(--tk-primary); }
[dir="rtl"] .tk-body .list-group-item.active { box-shadow: inset -3px 0 0 var(--tk-primary); }
.tk-body .list-group-item.disabled { color: var(--tk-muted); }
.tk-body .badge { border-radius: 999px; }

.tk-body .tile { border-radius: var(--tk-radius); }
.tk-body .tile .title { color: var(--tk-text); }
.tk-body .tile .stat, .tk-body a.tile:hover .icon { color: var(--tk-primary); }
.tk-body a.tile:hover { border-color: var(--tk-primary); }

/* Sidebar */
.tk-body .sidebar .panel-sidebar { box-shadow: none; }
.tk-body .sidebar .panel-sidebar .panel-heading { background: var(--tk-surface); }

/* Tables */
.tk-body .table { color: var(--tk-text); }
.tk-body .table th, .tk-body .table td, .tk-body .table thead th { border-color: var(--tk-border); }
.tk-body .table thead th, .tk-body .table-container .dataTable thead > tr > th { color: var(--tk-muted); background: var(--tk-surface-2); font-weight: 600; font-size: 13px; }
.tk-body .table-hover tbody tr:hover, .tk-body .table-list tbody tr:hover { background: var(--tk-surface-2); }
.tk-body .table-striped tbody tr:nth-of-type(odd) { background: var(--tk-surface-2); }
.tk-body .table-list tbody tr[onclick] { cursor: pointer; }
.tk-body .table-container { border: 1px solid var(--tk-border); border-radius: var(--tk-radius); box-shadow: var(--tk-shadow); overflow: hidden; }
.tk-body .table-container .table-top { border-color: var(--tk-border); }
.tk-body .dataTables_wrapper, .tk-body .dataTables_info, .tk-body .dataTables_wrapper label { color: var(--tk-muted); }
.tk-body .pagination > li > span, .tk-body .pagination > li > a, .tk-body .page-link { background: var(--tk-surface); border-color: var(--tk-border); color: var(--tk-text); }
.tk-body .pagination > .active > span, .tk-body .pagination > .active > a, .tk-body .page-item.active .page-link { background: var(--tk-primary); border-color: var(--tk-primary); color: var(--tk-on-primary); }
.tk-body .pagination > .disabled > span, .tk-body .page-item.disabled .page-link { color: var(--tk-muted); background: var(--tk-surface-2); }

/* Inherited WHMCS service list: DataTables paints the cells, not just the rows. */
#tableServicesList_wrapper .dataTables_info,
#tableServicesList_wrapper .dataTables_length {
    background-color: var(--tk-surface-2); color: var(--tk-text-2); border-color: var(--tk-border);
}
#tableServicesList_wrapper .dataTables_filter input,
#tableServicesList_wrapper .dataTables_length select {
    background-color: var(--tk-surface); color: var(--tk-text); border-color: var(--tk-border-strong);
}
#tableServicesList tbody > tr > td { background-color: var(--tk-surface); color: var(--tk-text); }
#tableServicesList tbody > tr:nth-child(even) > td { background-color: var(--tk-surface-2); }
#tableServicesList tbody > tr:is(:hover, :focus-within) > td { background-color: var(--tk-surface-3); }
#tableServicesList td .text-muted { color: var(--tk-muted) !important; } /* Bootstrap utility is !important. */
#tableServicesList td a { color: var(--tk-link); }
#tableServicesList .label.status { background-color: var(--tk-surface-3); color: var(--tk-text-2); }
#tableServicesList .status.status-active { background-color: var(--tk-success-soft); color: var(--tk-text); }
#tableServicesList .status.status-pending { background-color: var(--tk-amber-soft); color: var(--tk-amber-text); }
#tableServicesList .status.status-suspended { background-color: var(--tk-danger-soft); color: var(--tk-text); }

/* Forms */
.tk-body .form-control, .tk-body .custom-select, .tk-body select.form-control, .tk-body textarea.form-control,
.tk-body .input-group-text, .tk-body .input-group-addon {
    background-color: var(--tk-surface); color: var(--tk-text); border-color: var(--tk-border-strong); border-radius: var(--tk-radius-sm);
}
.tk-body .form-control::placeholder { color: var(--tk-muted); opacity: .8; }
.tk-body .form-control:disabled, .tk-body .form-control[readonly], .tk-body .form-control.disabled { background-color: var(--tk-surface-3); color: var(--tk-muted); }
.tk-body .input-group-text, .tk-body .input-group-addon { background-color: var(--tk-surface-2); }
.tk-body label, .tk-body .control-label { color: var(--tk-text-2); }
.tk-body .help-block, .tk-body .form-text { color: var(--tk-muted); }
.tk-body .custom-file-label { background: var(--tk-surface); color: var(--tk-text); border-color: var(--tk-border-strong); }
.tk-body input[type=checkbox]:after { border-color: var(--tk-border-strong); background: var(--tk-surface); }
.tk-body input[type=checkbox]:hover:after { border-color: var(--tk-primary); }
.tk-body input[type=checkbox]:checked:after { border-color: var(--tk-primary); background-color: var(--tk-primary); }
.tk-body input[type=checkbox]:checked:before { color: var(--tk-on-primary); }
/* base.css hides native checkboxes and draws pseudo-elements; keep a visible keyboard focus ring */
.tk-body input[type=checkbox]:focus-visible:after { outline: 2px solid var(--tk-focus); outline-offset: 2px; }
.tk-body .md-editor > textarea.markdown-editor, .tk-body .md-editor > .md-preview { background-color: var(--tk-surface) !important; color: var(--tk-text); border-color: var(--tk-border) !important; }
.tk-body .md-editor > .btn-toolbar > .btn-group .btn { border-color: var(--tk-border); }
@media (prefers-color-scheme: dark) {
    html:not([data-tk-theme="light"]) .tk-body select.form-control { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a1a8b3' d='M0 0h10L5 6z'/%3E%3C/svg%3E"); }
}
html[data-tk-theme="dark"] .tk-body select.form-control { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a1a8b3' d='M0 0h10L5 6z'/%3E%3C/svg%3E"); }

/* Dropdowns, modals, tooltips, popovers (non-header) */
.tk-body .dropdown-menu { background: var(--tk-surface); border-color: var(--tk-border); color: var(--tk-text); border-radius: var(--tk-radius-sm); box-shadow: var(--tk-shadow-lg); }
.tk-body .dropdown-item, .tk-body .dropdown-menu > li > a { color: var(--tk-text); }
.tk-body .dropdown-item:hover, .tk-body .dropdown-item:focus, .tk-body .dropdown-menu > li > a:hover { background: var(--tk-surface-2); color: var(--tk-text); }
.tk-body .dropdown-divider { border-color: var(--tk-border); }
.tk-body .modal-content { background: var(--tk-surface); color: var(--tk-text); border-color: var(--tk-border); border-radius: var(--tk-radius); }
.tk-body .modal-header, .tk-body .modal-header.bg-light, .tk-body .modal-footer { background: var(--tk-surface-2) !important; border-color: var(--tk-border); }
.tk-body .close { color: var(--tk-text); text-shadow: none; }
.tk-body .popover { background: var(--tk-surface); border-color: var(--tk-border); }
.tk-body .popover-body, .tk-body .popover-content { color: var(--tk-text); }

/* Tabs */
.tk-body .nav-tabs { border-color: var(--tk-border); }
.tk-body .nav-tabs > li > a, .tk-body .nav-tabs .nav-link { color: var(--tk-muted); border-color: transparent; }
.tk-body .nav-tabs > li.active > a, .tk-body .nav-tabs > li > a.active, .tk-body .nav-tabs .nav-link.active {
    color: var(--tk-text); background: var(--tk-surface); border-color: var(--tk-border) var(--tk-border) var(--tk-surface);
}
.tk-body .tab-content.product-details-tab-container, .tk-body .product-details-tab-container { background: var(--tk-surface); border: 1px solid var(--tk-border); border-top: 0; padding: 20px; border-radius: 0 0 var(--tk-radius) var(--tk-radius); }

/* Alerts */
.tk-body .alert { border-radius: var(--tk-radius-sm); border-width: 1px; }
.tk-body .alert-success { background: var(--tk-success-soft); border-color: color-mix(in srgb, var(--tk-success) 35%, transparent); color: var(--tk-text); }
.tk-body .alert-danger, .tk-body .alert-error { background: var(--tk-danger-soft); border-color: color-mix(in srgb, var(--tk-danger) 35%, transparent); color: var(--tk-text); }
.tk-body .alert-info { background: var(--tk-info-soft); border-color: color-mix(in srgb, var(--tk-info) 35%, transparent); color: var(--tk-text); }
.tk-body .alert-warning { background: var(--tk-amber-soft); border-color: var(--tk-amber-border); color: var(--tk-amber-text); }
.tk-body .alert a:not(.btn), .tk-body .alert-link { color: inherit; text-decoration: underline; }

/* Status labels (services, invoices, tickets) */
.tk-body .label.status { border-radius: 999px; font-weight: 600; }

/* Empty states */
.tk-body .message-no-data { background: var(--tk-surface); border: 1px dashed var(--tk-border-strong); border-radius: var(--tk-radius); }
.tk-body .message-text { color: var(--tk-text-2); }

/* Invoices / billing */
.tk-body .invoice { border: 1px solid var(--tk-border); border-radius: var(--tk-radius); box-shadow: var(--tk-shadow); }
.tk-body .invoice .well, .tk-body .invoice .sub-total-row td, .tk-body .invoice .total-row td { background: var(--tk-surface-2); color: var(--tk-text); border-color: var(--tk-border); }
.tk-body .PayIMG { background-color: var(--tk-surface); }
.tk-body .panel-sidebar.panel-payment { background: var(--tk-surface); border-color: var(--tk-border); }
.tk-body .payment-form input[type=text] { background: var(--tk-surface); color: var(--tk-text); border-color: var(--tk-border-strong); }
/* Add funds (clientareaaddfunds.tpl inline styles use fixed light colours) */
.tk-body .form-item-label { color: var(--tk-text-2) !important; }
.tk-body .pay_method > a { background-color: var(--tk-surface); color: var(--tk-text); }
.tk-body .money .addmoeny { box-shadow: none; }
.tk-body .money .addmoeny:hover, .tk-body .money .addmoeny:focus-visible { border-color: var(--tk-primary); }

/* Tickets */
.tk-body .ticket-reply { border: 1px solid var(--tk-border); border-radius: var(--tk-radius); margin-bottom: 16px; overflow: hidden; }
.tk-body .ticket-reply .ticket-reply-top { background: var(--tk-surface-2); border-bottom: 1px solid var(--tk-border); color: var(--tk-text-2); }
.tk-body .ticket-reply.staff { border-inline-start: 3px solid var(--tk-primary); }
.tk-body .ticket-message { color: var(--tk-text); }
.tk-body .ticket-number { color: var(--tk-muted); font-variant-numeric: tabular-nums; }
.tk-body .ticket-subject.unread { font-weight: 700; color: var(--tk-text); }

/* Service details */
.tk-body .product-details { border: 1px solid var(--tk-border); border-radius: var(--tk-radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--tk-shadow); }
.tk-body .product-status { border-radius: var(--tk-radius-sm); overflow: hidden; }
.tk-body .product-details h4 { font-size: 13px; color: var(--tk-muted); font-weight: 600; margin: 14px 0 4px; }

/* Auth */
.tk-body .login-page { background: radial-gradient(1200px 600px at 20% -10%, #2a3150 0%, transparent 60%), var(--tk-header) !important; min-height: 100vh; height: auto; padding: 72px 16px 40px; }
.tk-body .login-page.register-page { padding-top: 72px; }
.tk-body .logincontainer { border: 1px solid var(--tk-border); border-radius: var(--tk-radius); box-shadow: var(--tk-shadow-lg); }
.tk-body .logincontainer-body h1 { color: var(--tk-text); font-weight: 700; }
.tk-body .logincontainer-footer { background: var(--tk-surface-2); color: var(--tk-text-2); border-top: 1px solid var(--tk-border); border-radius: 0 0 var(--tk-radius) var(--tk-radius); }
.tk-body .password-content .progress { background-color: var(--tk-surface-3); }

/* ---------- 8. Footer ---------- */
.tk-footer { background: var(--tk-header); color: var(--tk-header-muted); padding: 56px 0 28px; margin-top: 0; }
.tk-footer a { color: var(--tk-header-text); }
.tk-footer a:hover { color: #fff; text-decoration: underline; }
.tk-footer__cta {
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
    padding: 28px 32px; margin-bottom: 48px; border-radius: var(--tk-radius);
    background: linear-gradient(120deg, #2a3a8f 0%, #3755be 55%, #4a68d4 100%);
}
.tk-footer__cta-title { margin: 0; color: #fff; font-size: 24px; font-weight: 700; }
.tk-footer__cta .btn-primary { background: #fff; border-color: #fff; color: #1d2a6b; }
.tk-footer__cta .btn-primary:hover { background: #eef1fb; border-color: #eef1fb; color: #1d2a6b; }
.tk-body .tk-footer__h { font-size: 14px; font-weight: 700; color: var(--tk-header-text); text-transform: none; margin-bottom: 14px; letter-spacing: .02em; }
.tk-footer__links li, .tk-footer__contact li { margin-bottom: 10px; font-size: 14px; }
.tk-footer__contact li { display: flex; gap: .6rem; align-items: baseline; }
.tk-footer__contact i { color: var(--tk-header-muted); }
.tk-footer__logo { width: 132px; height: auto; margin-bottom: 12px; }
.tk-footer__about { font-size: 13px; line-height: 1.75; }
.tk-footer__small { font-size: 12px; }
.tk-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--tk-header-border); font-size: 12px; }
.tk-footer .tk-lang__toggle { color: var(--tk-header-text); }

.tk-back-to-top {
    position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 1020; width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tk-primary); color: var(--tk-on-primary) !important; box-shadow: var(--tk-shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s;
}
.tk-back-to-top.aos-animate { opacity: 1; visibility: visible; transform: none; }

/* ---------- 9. Dashboard ---------- */
.tk-dash { margin-bottom: 24px; }
.tk-dash__hero {
    display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between;
    padding: 24px 28px; border-radius: var(--tk-radius); background: var(--tk-header); color: var(--tk-header-text);
    border: 1px solid var(--tk-header-border);
}
.tk-dash__hello { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tk-avatar {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #3755be, #6c87e6); color: #fff; font-weight: 700; font-size: 20px;
}
.tk-dash__eyebrow { margin: 0; color: var(--tk-header-muted); font-size: 13px; }
.tk-body .tk-dash__name { margin: 2px 0 0; font-size: 22px; font-weight: 700; color: #fff; line-height: 1.3; word-break: break-word; }
.tk-dash__name a { color: #fff !important; }
.tk-dash__verify { margin: 4px 0 0; font-size: 12px; color: var(--tk-header-muted); }
.tk-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tk-metrics a {
    display: flex; flex-direction: column; min-width: 92px; padding: 10px 14px; border-radius: var(--tk-radius-sm);
    background: rgba(255, 255, 255, .05); border: 1px solid var(--tk-header-border); color: var(--tk-header-text) !important; text-decoration: none !important;
}
.tk-metrics a:hover { background: rgba(255, 255, 255, .1); }
.tk-metrics__num { font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tk-metrics__label { font-size: 12px; color: var(--tk-header-muted); }
.tk-metrics .is-attention a { border-color: #b07a1d; background: rgba(245, 181, 74, .12); }
.tk-metrics .is-attention .tk-metrics__num { color: #f5b54a; }

.tk-alert-amber {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 16px; padding: 14px 18px;
    border-radius: var(--tk-radius-sm); background: var(--tk-amber-soft); border: 1px solid var(--tk-amber-border); color: var(--tk-amber-text);
}
.tk-alert-amber > i { color: var(--tk-amber); font-size: 18px; }
.tk-alert-amber__text { flex: 1 1 240px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.tk-body .tk-btn-amber { background: var(--tk-amber); border-color: var(--tk-amber); color: #1b1404; }
.tk-body .tk-btn-amber:hover { filter: brightness(1.06); color: #1b1404; }

.tk-dash__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; }
@media (min-width: 1200px) { .tk-dash__grid { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); } }
.tk-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 12px; }
.tk-body .tk-section-head h2 { font-size: 16px; font-weight: 700; margin: 0; }
.tk-section-head a { font-size: 13px; font-weight: 600; }
.tk-svc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 576px) { .tk-svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tk-svc {
    display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--tk-radius);
    background: var(--tk-surface); border: 1px solid var(--tk-border); box-shadow: var(--tk-shadow); color: var(--tk-text);
}
.tk-svc__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tk-body .tk-svc__name { font-size: 15px; font-weight: 700; margin: 0; color: var(--tk-text); }
.tk-svc__id { margin: 0; font-family: var(--tk-mono); font-size: 13px; color: var(--tk-text-2); word-break: break-all; }
.tk-svc__meta { margin: 0; font-size: 13px; color: var(--tk-muted); }
.tk-svc__meta span { margin-inline-end: .35rem; }
.tk-svc__manage { align-self: flex-start; margin-top: auto; }
.tk-svc--link { align-items: flex-start; text-decoration: none !important; min-height: 110px; justify-content: center; }
.tk-svc--link:hover { border-color: var(--tk-primary); }
.tk-svc__big { font-size: 26px; font-weight: 700; color: var(--tk-primary); line-height: 1; }
.tk-card { background: var(--tk-surface); border: 1px solid var(--tk-border); border-radius: var(--tk-radius); box-shadow: var(--tk-shadow); padding: 18px; }
.tk-card + .tk-card { margin-top: 12px; }
.tk-balance__label { margin: 0; color: var(--tk-muted); font-size: 13px; }
.tk-balance__value { margin: 4px 0 14px; font-size: 26px; font-weight: 700; color: var(--tk-text); }
.tk-balance__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-body .tk-shortcuts__title { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.tk-shortcuts ul { margin: 0; }
.tk-shortcuts a { display: flex; align-items: center; gap: .6rem; padding: 9px 8px; margin: 0 -8px; border-radius: 6px; color: var(--tk-text); font-size: 14px; }
.tk-shortcuts a:hover { background: var(--tk-surface-2); color: var(--tk-text); text-decoration: none; }
.tk-shortcuts i { color: var(--tk-muted); }
.tk-tpl-clientareahome .client-home-panels { margin-top: 8px; }

/* ---------- 10. Public home ---------- */
.tk-hero { background: radial-gradient(900px 480px at 85% 10%, rgba(55, 85, 190, .35) 0%, transparent 65%), var(--tk-header); color: var(--tk-header-text); padding: 72px 0 80px; }
.tk-hero__grid { display: grid; gap: 40px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .tk-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); } }
.tk-eyebrow { margin: 0 0 12px; color: #9fb2ff; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.tk-body .tk-hero__title { color: #fff; font-size: clamp(34px, 5vw, 56px); line-height: 1.12; font-weight: 800; margin: 0 0 18px; }
.tk-hero__title span { display: block; }
.tk-hero__accent { background: linear-gradient(90deg, #a9bbff, #6f8cf2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tk-hero__lead { max-width: 40em; font-size: 17px; line-height: 1.7; color: var(--tk-header-muted); margin-bottom: 28px; }
.tk-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.tk-hero .btn-primary { background: #5b78e6; border-color: #5b78e6; color: #fff; }
.tk-hero .btn-primary:hover { background: #6d88ee; border-color: #6d88ee; color: #fff; }
.tk-body .tk-btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .28); color: #fff; }
.tk-body .tk-btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.tk-plan {
    position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--tk-radius);
    background: var(--tk-surface); border: 1px solid var(--tk-border); box-shadow: var(--tk-shadow); color: var(--tk-text);
}
.tk-plan.is-featured { border-color: var(--tk-primary); box-shadow: 0 0 0 1px var(--tk-primary), var(--tk-shadow); }
.tk-plan--hero { background: var(--tk-header-2); border-color: var(--tk-header-border); color: var(--tk-header-text); box-shadow: var(--tk-shadow-lg); }
.tk-body .tk-plan--hero .tk-plan__name, .tk-plan--hero .tk-plan__price { color: #fff; }
.tk-plan--hero .tk-plan__cycle, .tk-plan--hero .tk-plan__ip { color: var(--tk-header-muted); }
.tk-plan--hero .tk-plan__specs li { border-color: var(--tk-header-border); }
.tk-plan__badge { align-self: flex-start; margin-bottom: 12px; padding: 3px 10px; border-radius: 999px; background: var(--tk-amber); color: #1b1404; font-size: 12px; font-weight: 700; }
.tk-body .tk-plan__name { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.tk-plan__price { margin: 0; font-size: 36px; font-weight: 800; line-height: 1.1; color: var(--tk-text); }
.tk-plan__cur { font-size: 15px; font-weight: 700; color: var(--tk-muted); vertical-align: .9em; }
.tk-plan__cycle { margin: 4px 0 16px; font-size: 13px; color: var(--tk-muted); }
.tk-plan__specs { list-style: none; padding: 0; margin: 0 0 12px; font-family: var(--tk-mono); font-size: 13px; }
.tk-plan__specs li { padding: 7px 0; border-bottom: 1px dashed var(--tk-border); }
[dir="rtl"] .tk-plan__specs { text-align: right; }
.tk-plan__ip { font-size: 13px; color: var(--tk-muted); margin: 0 0 18px; }
.tk-plan .btn { margin-top: auto; }

.tk-section { padding: 72px 0; background: var(--tk-bg); }
.tk-section--alt { background: var(--tk-surface-2); border-top: 1px solid var(--tk-border); border-bottom: 1px solid var(--tk-border); }
.tk-section__intro { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.tk-body .tk-section__title { font-size: clamp(24px, 3vw, 32px); line-height: 1.3; font-weight: 800; margin: 0 0 12px; }
.tk-section__lead { color: var(--tk-muted); font-size: 16px; line-height: 1.7; }
.tk-plans { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .tk-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tk-plans__note { text-align: center; margin: 24px 0 0; color: var(--tk-muted); font-size: 14px; }
.tk-split { display: grid; gap: 32px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .tk-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.tk-split .tk-section__title { text-align: start; }
.tk-os { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.tk-os li { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--tk-radius); background: var(--tk-surface); border: 1px solid var(--tk-border); font-weight: 700; color: var(--tk-text); }
.tk-os__icon, .tk-os li svg { width: 32px; height: 32px; flex: 0 0 auto; }
.tk-link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.tk-link-arrow::after { content: "→"; transition: transform .15s ease; }
[dir="rtl"] .tk-link-arrow::after { content: "←"; }
.tk-link-arrow:hover::after { transform: translateX(3px); }
[dir="rtl"] .tk-link-arrow:hover::after { transform: translateX(-3px); }
.tk-features { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .tk-features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tk-feature { padding: 24px; border-radius: var(--tk-radius); background: var(--tk-surface); border: 1px solid var(--tk-border); box-shadow: var(--tk-shadow); }
.tk-feature__icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; background: var(--tk-primary-soft); color: var(--tk-primary); margin-bottom: 14px; font-size: 18px; }
.tk-body .tk-feature h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.tk-feature p { color: var(--tk-muted); margin: 0; line-height: 1.7; }
.tk-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); counter-reset: none; }
@media (min-width: 768px) { .tk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tk-step { position: relative; padding: 24px; border-radius: var(--tk-radius); background: var(--tk-surface); border: 1px solid var(--tk-border); }
.tk-step__num { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: var(--tk-primary); color: var(--tk-on-primary); font-weight: 800; margin-bottom: 12px; }
.tk-body .tk-step h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.tk-step p { color: var(--tk-muted); line-height: 1.7; }
.tk-partners { padding: 48px 0 64px; }
.tk-partners__title { text-align: center; font-size: 15px; font-weight: 700; color: var(--tk-muted) !important; margin-bottom: 24px; }
.tk-partners__list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 40px; list-style: none; margin: 0; padding: 0; }
.tk-partners__list img, .tk-partners__list svg { height: 40px; width: auto; max-width: 140px; filter: grayscale(1); opacity: .55; }
@media (prefers-color-scheme: dark) { html:not([data-tk-theme="light"]) .tk-partners__list img, html:not([data-tk-theme="light"]) .tk-partners__list svg { filter: grayscale(1) invert(1) brightness(1.3); opacity: .6; } }
html[data-tk-theme="dark"] .tk-partners__list img, html[data-tk-theme="dark"] .tk-partners__list svg { filter: grayscale(1) invert(1) brightness(1.3); opacity: .6; }

/* Legacy Leap content pages (about, tos, aup, kb, announcements) */
.tk-body section { color: var(--tk-text); }
.tk-body .bg-primary-3 { background-color: var(--tk-header) !important; }

/* ---------- 11. RTL (Persian) ---------- */
[dir="rtl"] .tk-body { text-align: right; }
[dir="rtl"] .tk-body .text-left { text-align: right !important; }
[dir="rtl"] .tk-body .text-right { text-align: left !important; }
[dir="rtl"] .tk-body .pull-right, [dir="rtl"] .tk-body .float-right { float: left !important; }
[dir="rtl"] .tk-body .pull-left, [dir="rtl"] .tk-body .float-left { float: right !important; }
[dir="rtl"] .tk-body .mr-auto { margin-right: 0 !important; margin-left: auto !important; }
[dir="rtl"] .tk-body .ml-auto { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .tk-body .dropdown-menu { text-align: right; }
[dir="rtl"] .tk-body .tk-header .tk-nav .dropdown-menu { left: auto; right: 0; }
[dir="rtl"] .tk-body .dropdown-menu-right { right: auto; left: 0; }
[dir="rtl"] .tk-body .breadcrumb > li + li::before { padding: 0 5px; }
[dir="rtl"] .tk-body .input-password-strenght > span { right: auto; left: 15px; }
[dir="rtl"] .tk-body select.form-control { background-position-x: 11px; padding-right: .75rem; padding-left: 24px; }
[dir="rtl"] .tk-body .panel-sidebar .list-group-item span.badge { right: auto; left: 15px; }
[dir="rtl"] .tk-body .tile .icon { right: auto; left: 16px; }
[dir="rtl"] .tk-body .navbar-main .navbar-nav li .dropdown-toggle { background-position-x: 11px; }
[dir="rtl"] .tk-body .password-content .progress { margin: 0 12px 0 0; }
[dir="rtl"] .tk-body .table { text-align: right; }
/* Identifiers typed by the customer stay LTR inside RTL forms */
[dir="rtl"] .tk-body input[type="email"],
[dir="rtl"] .tk-body input[type="url"],
[dir="rtl"] .tk-body input[type="tel"],
[dir="rtl"] .tk-body input[type="password"],
[dir="rtl"] .tk-body input[name*="email"],
[dir="rtl"] .tk-body input[id*="Email"],
[dir="rtl"] .tk-body input[name*="domain"],
[dir="rtl"] .tk-body input[name*="hostname"],
[dir="rtl"] .tk-body input[name^="ns"],
[dir="rtl"] .tk-body input[name*="ip"],
[dir="rtl"] .tk-body input[name="postcode"],
[dir="rtl"] .tk-body input[name="phonenumber"],
[dir="rtl"] .tk-body input[name="ccnumber"],
[dir="rtl"] .tk-body input[name="cccvv"],
[dir="rtl"] .tk-body .tk-ltr input { direction: ltr; text-align: right; }
[dir="rtl"] .tk-body input[type="email"]::placeholder, [dir="rtl"] .tk-body input[name*="email"]::placeholder { text-align: right; }

/* ---------- 12. Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .tk-body *, .tk-body *::before, .tk-body *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 13. Print ---------- */
@media print {
    .tk-header-wrap, .tk-subnav, .tk-footer, .tk-back-to-top, .tk-auth-bar, .tk-skip { display: none !important; }
    .tk-body, .tk-body .main-body { background: #fff !important; color: #000 !important; }
}

/* Bootstrap's list reset only clears the left padding. */
[dir="rtl"] .tk-footer__contact { padding-inline-start: 0; }
.tk-footer__contact a { overflow-wrap: anywhere; }
