/* ============================================================
   Rahkarnet Client Panel — Kinsta-inspired, RTL
   ============================================================ */

@font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn[wght].woff2') format('woff2 supports variations'),
         url('fonts/Vazirmatn[wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --white: #fff;

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

    --primary-50: var(--neutral-50);
    --primary-100: var(--neutral-100);
    --primary-200: var(--neutral-200);
    --primary-300: var(--neutral-300);
    --primary-400: var(--neutral-400);
    --primary-500: var(--neutral-500);
    --primary-600: var(--neutral-600);
    --primary-700: var(--neutral-700);
    --primary-800: var(--neutral-800);
    --primary-900: var(--neutral-900);
    --primary-950: var(--neutral-900);

    --primary: var(--neutral-900);
    --primary-lifted: var(--neutral-800);
    --primary-accented: var(--neutral-700);
    --secondary: var(--neutral-500);
    --secondary-lifted: var(--neutral-600);
    --secondary-accented: var(--neutral-700);

    --success: #00a63e;
    --success-lifted: #008236;
    --success-accented: #016630;
    --info: #155dfc;
    --info-lifted: #1447e6;
    --info-accented: #193cb8;
    --notice: #7f22fe;
    --notice-lifted: #7008e7;
    --notice-accented: #5d0ec0;
    --warning: #f54a00;
    --warning-lifted: #ca3500;
    --warning-accented: #9f2d00;
    --error: #e7000b;
    --error-lifted: #c10007;
    --error-accented: #9f0712;

    --grayscale: var(--neutral-900);
    --grayscale-lifted: var(--neutral-800);
    --grayscale-accented: var(--neutral-700);
    --neutral: var(--neutral-500);
    --neutral-lifted: var(--neutral-600);
    --neutral-accented: var(--neutral-700);

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

    --border-muted: var(--neutral-200);
    --border: var(--neutral-300);
    --border-lifted: var(--neutral-400);
    --border-accented: var(--neutral-600);

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

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

    --text-xs: 0.625rem;
    --text-sm: 0.75rem;
    --text-md: 0.875rem;
    --text-lg: 1rem;
    --outline-sm: 1px;
    --outline-md: 2px;
    --outline-lg: 3px;
    --rounding-sm: 0.25rem;
    --rounding-md: 0.5rem;
    --rounding-lg: 0.75rem;
    --letter-spacing: 0em;
    --disabled-opacity: 25%;

    /* === Layout === */
    --rk-sidebar-w: 230px;
    --rk-topbar-h: 64px;

    /* === Brand === */
    --rk-accent:       #0f6e56;
    --rk-accent-dark:  #0a5743;
    --rk-accent-alpha: rgba(15, 110, 86, 0.12);

    /* === Surfaces === */
    --rk-page-bg:        #f7f4f0;
    --rk-topbar-bg:      #111111;
    --rk-sidebar-bg:     #ffffff;
    --rk-sidebar-border: #e8e4df;
    --rk-card-border:    #eae7e2;

    /* === Nav === */
    --rk-nav-color:      #4b5563;
    --rk-nav-hover-bg:   #f4f1ed;
    --rk-nav-active-bg:  #eef7f3;
    --rk-nav-active-fg:  var(--rk-accent);
}

/* ============================================================
   BASE
   ============================================================ */
body {
    font-family: 'Vazirmatn', tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--rk-page-bg);
    color: var(--text);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.rk-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--rk-topbar-h);
    background: var(--rk-topbar-bg);
    z-index: 1030;
}

.rk-topbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    gap: 10px;
}

.rk-logo {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.rk-logo:hover { text-decoration: none; }
.rk-logo-icon {
    height: 26px;
    width: auto;
    display: block;
}
.rk-logo-name {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.rk-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
}

/* Bell button */
.rk-icon-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.72);
    font-size: 15px;
    cursor: pointer;
    position: relative;
    transition: background 0.14s, color 0.14s;
    padding: 0;
}
.rk-icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

.rk-notif-dot {
    position: absolute;
    top: 7px; right: 8px;
    width: 7px; height: 7px;
    background: #ef4444;
    border-radius: 50%;
    border: 1.5px solid var(--rk-topbar-bg);
    pointer-events: none;
}

/* User button */
.rk-user-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    padding: 5px 10px 5px 8px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.14s;
}
.rk-user-btn:hover,
.rk-user-btn:focus,
.rk-user-btn.focus {
    background: rgba(255,255,255,0.14);
    color: #fff;
    box-shadow: none;
    outline: none;
}
.rk-user-btn::after { display: none; }

.rk-avatar {
    width: 26px; height: 26px;
    background: var(--rk-accent);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}

.rk-user-label {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rk-chevron {
    font-size: 9px;
    opacity: 0.55;
    transition: transform 0.18s;
    flex-shrink: 0;
}
.show > .rk-user-btn .rk-chevron,
.rk-user-btn[aria-expanded="true"] .rk-chevron { transform: rotate(180deg); }

/* User dropdown */
.rk-user-dropdown .dropdown-menu {
    right: 0 !important;
    left: auto !important;
    top: calc(100% + 6px) !important;
    transform: none !important;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    min-width: 175px;
    padding: 5px;
}
.rk-user-dropdown .dropdown-item {
    border-radius: 6px;
    font-size: 13px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
}
.rk-user-dropdown .dropdown-item:hover,
.rk-user-dropdown .dropdown-item:focus { background: #f3f4f6; color: #111; }
.rk-user-dropdown .dropdown-item.rk-logout-item { color: #dc2626; }
.rk-user-dropdown .dropdown-item.rk-logout-item:hover { background: #fef2f2; }
.rk-user-dropdown .dropdown-item i { width: 14px; text-align: center; flex-shrink: 0; }
.rk-user-dropdown .dropdown-divider { margin: 4px 0; }

/* Login button */
.rk-btn-light {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    text-decoration: none;
    transition: background 0.14s;
}
.rk-btn-light:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.rk-sidebar {
    position: fixed;
    top: var(--rk-topbar-h);
    right: 0;
    width: var(--rk-sidebar-w);
    height: calc(100vh - var(--rk-topbar-h));
    background: var(--rk-sidebar-bg);
    border-left: 1px solid var(--rk-sidebar-border);
    overflow-y: auto;
    z-index: 1020;
    padding: 22px 0;
}

.rk-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 10px;
}
.rk-nav li { margin-bottom: 3px; }

.rk-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--rk-nav-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: background 0.12s, color 0.12s;
}
.rk-nav li a:hover {
    background: var(--rk-nav-hover-bg);
    color: #111;
    text-decoration: none;
}
.rk-nav li.rk-active a {
    background: var(--rk-nav-active-bg);
    color: var(--rk-nav-active-fg);
    font-weight: 500;
}
.rk-nav li a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: color 0.12s;
    margin-right: 10px;
}
.rk-nav li.rk-active a i { color: var(--rk-accent); }

/* ============================================================
   MAIN NAV SIDEBAR — compact icon rail (service/domain details only)
   Collapses .rk-sidebar to an icon-only rail; hovering (or keyboard focus)
   expands it back to full width as a floating overlay — position:fixed
   already, so expanding never reflows the page. Toggled by templatefile
   in header.tpl (rkCompactMainNavPage): currently ONLY
   clientareaproductdetails / clientareadomaindetails, because those are
   the pages where WHMCS's own primarySidebar (بررسی/دسترسی/امنیت/...)
   already occupies a column and two full-width sidebars felt cramped.
   Do NOT widen this scope without being asked — add the templatefile to
   the assign in header.tpl only when explicitly requested for a new page.
   ============================================================ */
:root {
    --rk-sidebar-compact-w: 64px;
}
.rk-sidebar.rk-sidebar--compact {
    width: var(--rk-sidebar-compact-w);
    transition: width 0.15s ease;
}
.rk-sidebar.rk-sidebar--compact:hover,
.rk-sidebar.rk-sidebar--compact:focus-within {
    width: var(--rk-sidebar-w);
    box-shadow: 6px 0 18px rgba(0, 0, 0, 0.08);
}
.rk-sidebar.rk-sidebar--compact .rk-nav li a {
    justify-content: center;
}
.rk-sidebar.rk-sidebar--compact:hover .rk-nav li a,
.rk-sidebar.rk-sidebar--compact:focus-within .rk-nav li a {
    justify-content: flex-start;
}
.rk-sidebar.rk-sidebar--compact .rk-nav li a span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.1s ease, width 0.15s ease;
}
.rk-sidebar.rk-sidebar--compact:hover .rk-nav li a span,
.rk-sidebar.rk-sidebar--compact:focus-within .rk-nav li a span {
    opacity: 1;
    width: auto;
    overflow: visible;
}

/* ============================================================
   MAIN NAV SIDEBAR — mobile (hamburger / off-canvas)
   Below the breakpoint, .rk-sidebar leaves its fixed desktop column and
   becomes a full-height off-canvas drawer hidden past the right edge
   (RTL: "closed" = translateX(100%), sliding further right/off-screen).
   .rk-nav-toggle (topbar) adds/removes .rk-sidebar--open + toggles the
   backdrop via the inline script right after </aside> in header.tpl.
   ============================================================ */
.rk-nav-toggle { display: none; }
.rk-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    z-index: 1015;
}
.rk-sidebar-backdrop.is-visible { display: block; }

@media (max-width: 991.98px) {
    .rk-nav-toggle { display: flex; }
    /* توپ‌بار موبایل: همبرگر همیشه در لبه‌ی شروع (راست، چون RTL) اولین
       فرزند فلکس باقی می‌ماند؛ لوگو با position:absolute واقعاً وسط صفحه
       است (نه فقط فاصله‌ی باقی‌مانده از دو مارجین خودکار قبلی که وسط واقعی
       نبود)، و کمی کوچک‌تر از حالت دسکتاپ. */
    .rk-topbar-inner { position: relative; justify-content: space-between; }
    .rk-logo {
        position: absolute;
        right: 50%;
        transform: translateX(50%);
        margin: 0;
    }
    .rk-logo-icon { height: 21px; }
    .rk-logo-name { font-size: 14.5px; }
    .rk-nav-toggle { order: -1; }
    .rk-topbar-actions { margin-right: 0; }
    .rk-sidebar,
    .rk-sidebar.rk-sidebar--compact {
        width: min(var(--rk-sidebar-w), 82vw);
        transform: translateX(100%);
        transition: transform 0.22s ease;
        box-shadow: -10px 0 28px rgba(0, 0, 0, 0.18);
    }
    .rk-sidebar.rk-sidebar--open { transform: translateX(0); }
    /* حالت icon-rail فشرده فقط با hover/focus معنا دارد؛ روی موبایل همیشه
       با نام کامل باز می‌شود (مثل حالت باز-شده‌ی دسکتاپ). */
    .rk-sidebar.rk-sidebar--compact .rk-nav li a { justify-content: flex-start; }
    .rk-sidebar.rk-sidebar--compact .rk-nav li a span { opacity: 1; width: auto; overflow: visible; }
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.rk-layout {
    padding-top: var(--rk-topbar-h);
    min-height: 100vh;
    background: var(--rk-page-bg);
}
.rk-layout--auth {
    margin-right: var(--rk-sidebar-w);
}
.rk-layout--auth.rk-layout--sidebar-compact {
    margin-right: var(--rk-sidebar-compact-w);
}
@media (max-width: 991.98px) {
    .rk-layout--auth,
    .rk-layout--auth.rk-layout--sidebar-compact {
        margin-right: 0;
    }
}

.rk-content {
    padding: 28px 28px 40px !important;
    max-width: 100% !important;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: 1px solid var(--rk-card-border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 8px rgba(0,0,0,0.02);
    background: #fff;
}
.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--rk-card-border);
    border-radius: 10px 10px 0 0 !important;
    padding: 14px 18px;
    font-weight: 500;
    font-size: 15px;
    color: #111;
}
.card-body { padding: 18px; }
.card-footer {
    background: #fff !important;
    border-top: 0;
    border-radius: 0 0 10px 10px !important;
    padding: 4px 18px 16px;
    font-size: 13px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary { background-color: var(--rk-accent); border-color: var(--rk-accent); }
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--rk-accent-dark);
    border-color: var(--rk-accent-dark);
    box-shadow: 0 0 0 0.2rem var(--rk-accent-alpha);
}
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--rk-accent-dark);
    border-color: var(--rk-accent-dark);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control { border-radius: 7px; font-size: 14px; }
.form-control:focus {
    border-color: var(--rk-accent);
    box-shadow: 0 0 0 3px var(--rk-accent-alpha);
}

/* ============================================================
   TABLES
   ============================================================ */
.table thead th {
    border-bottom: 1px solid var(--rk-card-border);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    font-weight: 500;
    padding: 10px 14px;
}
.table td { font-size: 14px; vertical-align: middle; padding: 10px 14px; }
.table-hover tbody tr:hover { background: #f9f6f2; }

/* List pages (services / domains / invoices / tickets): card-style table.
   theme.css's ".dataTables_wrapper table.table-list" outranks a plain class
   selector, so border/radius need !important to win. */
.table-list {
    background: #fff !important;
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 10px !important;
    overflow: hidden;
    /* global `table { border-collapse: collapse }` stops border-radius from
       clipping table corners in most browsers — switch this table back to
       the separate model (spacing 0 keeps the seamless collapsed look). */
    border-collapse: separate !important;
    border-spacing: 0;
}
.table-list thead th { background: var(--rk-page-bg) !important; }
.table-list tbody tr { cursor: pointer; transition: background 0.12s; }
.table-list tbody tr:hover { background: var(--rk-nav-hover-bg) !important; }
.table-list tbody td { border-top: 1px solid var(--rk-card-border); }
.table-list tbody tr:first-child td { border-top: 0; }
.table-list .label.status {
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 12px;
    font-weight: 500;
}

/* List-page toolbar: relocates the WHMCS "view filters"/"actions" sidebar
   panels into a horizontal bar so the table can go full-width. The filter
   click-handler (tablelist.tpl) targets .list-group-item/.active directly,
   so only layout is overridden here — none of those classes are renamed. */
.rk-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}
.rk-list-toolbar .card-sidebar {
    border: 0;
    box-shadow: none;
    background: transparent;
    margin-bottom: 0 !important;
}
.rk-list-toolbar .card-header { display: none; }
/* whmcs.js collapses every .card-sidebar .collapsable-card-body on load and
   only re-expands it on a .card-minimise click — but that toggle button
   lives inside the .card-header we just hid, so with no header there was
   no way left to un-collapse it. Force it open here regardless of the
   inline style="display:none" jQuery's .hide() sets (needs !important to
   outrank a plain, non-important inline style). */
.rk-list-toolbar .collapsable-card-body { display: block !important; }
.rk-list-toolbar .list-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}
.rk-list-toolbar .list-group-item {
    display: inline-flex;
    width: auto;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 20px !important;
    padding: 6px 14px;
    background: #fff;
    color: var(--text-lifted);
    font-size: 13px;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.rk-list-toolbar .list-group-item i { display: none; }
.rk-list-toolbar .list-group-item:hover { border-color: var(--rk-accent); color: var(--text); }
.rk-list-toolbar .list-group-item.active {
    background: var(--rk-accent);
    border-color: var(--rk-accent);
    color: #fff;
}
/* Own the inner wrapper/label/badge directly (rather than relying on the
   reused .sidebar ancestor rule) so the count sits beside the label instead
   of stacking under it, whatever markup variant WHMCS core renders here. */
.rk-list-toolbar .sidebar-menu-item-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
}
.rk-list-toolbar .sidebar-menu-item-label {
    font-size: 13px !important;
    line-height: 1.2 !important;
}
.rk-list-toolbar .sidebar-menu-item-badge {
    display: inline-flex !important;
    margin: 0 !important;
}
.rk-list-toolbar .list-group-item .badge,
.rk-list-toolbar .sidebar-menu-item-badge .badge {
    display: inline-block !important;
    width: auto !important;
    min-width: 0 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    padding: 1px 7px !important;
    border-radius: 10px !important;
    background: rgba(0,0,0,0.08) !important;
    color: inherit !important;
}
.rk-list-toolbar .list-group-item.active .badge { background: rgba(255,255,255,0.28) !important; color: #fff !important; }

/* ============================================================
   DATATABLES TOOLBAR (RTL fixes)
   ============================================================ */
.dataTables_wrapper .dataTables_info { display: none; }
.dataTables_wrapper .dataTables_length {
    float: left;
    font-size: 13px;
    color: var(--text-lifted);
}
.dataTables_wrapper .dataTables_length select { margin: 0 4px; }
/* Bootstrap's first/last pagination-corner rounding assumes LTR; DOM order
   stays [prev ... next] but visually mirrors under dir=rtl, so the corner
   that should round is the opposite of what these rules target. */
body .pagination .page-item:first-child .page-link {
    border-radius: 0 var(--rounding-md) var(--rounding-md) 0 !important;
}
body .pagination .page-item:last-child .page-link {
    border-radius: var(--rounding-md) 0 0 var(--rounding-md) !important;
}

/* ============================================================
   CART: CONFIGURE PRODUCT (orderforms/standard_cart)
   ============================================================ */
/* "دسته‌بندی‌ها"/"عملیات" column is redundant here — hide it and let the
   configure form take the full width (CSS-only so the shared order-form
   template itself stays untouched). */
#order-standard_cart .cart-sidebar { display: none !important; }
#order-standard_cart .cart-body { width: 100% !important; float: none !important; }

/* Addon cards: give selected vs. unselected a real visual difference (both
   states rendered identically green before) and align with the rk- card
   language. Class names (panel-addon, panel-addon-selected, panel-add) are
   left as-is — scripts.js's whole-card click / iCheck toggle depends on them. */
#order-standard_cart .panel-addon {
    text-align: right;
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 10px !important;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: border-color 0.12s, background 0.12s;
}
#order-standard_cart .panel-addon:hover { border-color: var(--rk-accent) !important; }
#order-standard_cart .panel-addon .panel-body {
    border-radius: 0;
    padding: 16px 18px 10px;
    font-size: 1em;
}
#order-standard_cart .panel-addon .panel-body label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}
#order-standard_cart .panel-addon .panel-price {
    padding: 8px 18px;
    background: var(--rk-page-bg);
    color: var(--text-lifted);
    font-size: 13px;
}
/* The whole card is already clickable and the selected/unselected card
   styling below now carries that state — the redundant "Add to cart" bar
   is just noise on top of it. */
#order-standard_cart .panel-addon .panel-add { display: none !important; }
#order-standard_cart .panel-addon-selected {
    border-color: var(--rk-accent) !important;
    background: var(--rk-accent-alpha);
}
#order-standard_cart .panel-addon-selected .panel-price { background: transparent; }

/* "Have questions? contact sales" notice — not needed on this page. */
#order-standard_cart .alert-warning.info-text-sm { display: none !important; }

/* "Continue" arrow points right (LTR-authored icon); flip it for RTL flow. */
#order-standard_cart #btnCompleteProductConfig .fa-arrow-circle-right {
    display: inline-block;
    transform: scaleX(-1);
}

/* ============================================================
   CART: NEXUS CART (JS-mounted SPA, #nexus-root)
   ============================================================ */
/* Its stylesheet reads fonts from CSS custom properties
   (var(--font-sans), var(--default-font-family, ui-sans-serif...)) with no
   Vazirmatn anywhere in the fallback chain — redefine them on the mount
   point itself (higher specificity than the SPA's own :root rule, so it
   wins regardless of whether style.min.css is injected before or after
   this stylesheet). */
#nexus-root {
    --font-sans: 'Vazirmatn', tahoma, sans-serif;
    --font-inter: 'Vazirmatn', tahoma, sans-serif;
    --default-font-family: 'Vazirmatn', tahoma, sans-serif;
}

/* ============================================================
   CART: CHECKOUT (orderforms/standard_cart/checkout.tpl)
   ============================================================ */
/* .prepend-icon .field-icon has no explicit left/right, so it falls back to
   its LTR static position (left edge) while .field only reserved padding
   on the left — under RTL the icon's static position actually lands on the
   right, colliding head-on with the right-aligned Persian placeholder text
   that has no padding reserved there. Pin the icon and swap the padding. */
#order-standard_cart .prepend-icon .field-icon {
    left: auto !important;
    right: 0 !important;
    width: auto !important;
    padding-right: 5px;
    text-align: right;
}
#order-standard_cart .prepend-icon .field {
    padding-left: 12px !important;
    padding-right: 34px !important;
}

/* "Complete order" arrow — same LTR icon issue as configureproduct's
   "Continue" button. */
#order-standard_cart #btnCompleteOrder .fa-arrow-circle-right {
    display: inline-block;
    transform: scaleX(-1);
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer.footer {
    background: var(--rk-page-bg);
    border-top: 1px solid var(--rk-sidebar-border);
    color: #9ca3af;
    font-size: 12px;
    padding: 20px 0;
}
#footer .nav-link { color: #9ca3af; font-size: 12px; }
#footer .nav-link:hover { color: #6b7280; }

/* ============================================================
   DASHBOARD TILES (status cards)
   ============================================================ */
.tiles .row { margin-right: -8px; margin-left: -8px; }
.tiles .row > div { padding-right: 8px; padding-left: 8px; margin-bottom: 16px; }
.tiles .tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 8px rgba(0,0,0,0.02);
}
.tiles .tile:hover { background: #fff; border-color: var(--rk-accent) !important; }
.tiles .tile i {
    position: static;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-900);
    color: #fff;
    border-radius: 10px;
    font-size: 17px;
    transition: none;
}
.tiles .tile:hover i { font-size: 17px; color: #fff; }
.tiles .tile .tile-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.tiles .tile .stat {
    margin-top: 0;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}
.tiles .tile .title {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-lifted);
}
.tiles .tile .title i {
    position: static;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    font-size: 12px;
    color: var(--success);
}
.tiles .tile .highlight { display: none; }

@media (max-width: 1199.98px) {
    .tiles div:nth-child(1) > .tile,
    .tiles div:nth-child(2) > .tile {
        border: 1px solid var(--rk-card-border) !important;
    }
}

/* ============================================================
   RTL FIXES
   ============================================================ */
.dropdown-menu { text-align: right; direction: rtl; }
.float-right { float: left !important; }
.float-left { float: right !important; }
/* Bootstrap's input-group corner-rounding assumes LTR (first child = left
   edge = rounded, last child = right edge = square, etc.) — under RTL the
   first DOM child renders right-most and the last renders left-most, so
   every one of those rules is backwards. This previously only handled
   prepend-only / append-only cases correctly; a field with BOTH (e.g. a
   password field: key icon + input + reveal button) still came out wrong,
   since the input's "not last child" condition doesn't mean what it assumed.
   Reset everything to square, then round only the two TRUE outer edges. */
.input-group .form-control,
.input-group .custom-select,
.input-group-prepend .input-group-text,
.input-group-prepend .btn,
.input-group-append .input-group-text,
.input-group-append .btn {
    border-radius: 0 !important;
}
.input-group > .form-control:first-child,
.input-group > .custom-select:first-child,
.input-group > .input-group-prepend:first-child .input-group-text,
.input-group > .input-group-prepend:first-child .btn {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}
.input-group > .form-control:last-child,
.input-group > .custom-select:last-child,
.input-group > .input-group-append:last-child .input-group-text,
.input-group > .input-group-append:last-child .btn {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    height: 38px !important;
}

/* Margins: prepend/append need to overlap the field on the side actually
   touching it under RTL — the opposite of Bootstrap's LTR default. */
.input-group-prepend {
    margin-right: 0;
    margin-left: -1px;
}
.input-group-append {
    margin-left: 0;
    margin-right: -1px;
}
.input-group-append .btn + .btn,
.input-group-prepend .btn + .btn {
    margin-left: 0 !important;
    margin-right: -1px !important;
}

/* .form-control's height is font-size-driven (calc(1.5em + ...)); our smaller
   14px form-control font-size shrinks it below the unmodified 16px height of
   buttons/icon-boxes sharing the same input-group, so pin them all to match. */
.input-group .form-control,
.input-group-append .btn,
.input-group-prepend .btn,
.input-group-prepend .input-group-text,
.input-group-append .input-group-text {
    height: 38px;
}
.input-group-prepend .input-group-text,
.input-group-append .input-group-text {
    display: flex;
    align-items: center;
}

/* ============================================================
   MISC
   ============================================================ */
.alert { border-radius: 8px; font-size: 14px; }
.badge { font-weight: 500; }

.client-alerts { list-style: none; margin: 0; padding: 0; }
.client-alerts li a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    color: inherit;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
}
.client-alerts li a:hover { background: #f9f9f9; }
.client-alerts li.none { padding: 12px 14px; color: #9ca3af; font-size: 13px; }

/* ============================================================
   INVOICE (viewinvoice.tpl — standalone page, no header/footer)
   ============================================================ */
.invoice-container {
    font-family: 'Vazirmatn', tahoma, sans-serif;
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05);
}
.invoice-container h2 { font-size: 21px; font-weight: 600; margin-bottom: 2px; }
.invoice-container h3 { font-size: 14px; font-weight: 400; color: var(--text-lifted); }
.invoice-container strong { color: var(--text); font-weight: 500; }
.invoice-container address {
    color: var(--text-lifted);
    font-size: 13.5px;
    line-height: 1.8;
    font-style: normal;
}
.invoice-container hr { border-color: var(--rk-card-border); margin: 22px 0; }

/* Status: plain colored uppercase text -> pill badge */
.invoice-container .invoice-status {
    text-transform: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}
.invoice-container .invoice-status span {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    background: var(--bg-lifted);
}
.invoice-container .invoice-status .unpaid { background: rgba(231,0,11,0.1); color: var(--error); }
.invoice-container .invoice-status .paid { background: rgba(0,166,62,0.1); color: var(--success); }
.invoice-container .invoice-status .draft,
.invoice-container .invoice-status .cancelled { background: var(--bg-lifted); color: var(--text-lifted); }
.invoice-container .invoice-status .refunded { background: rgba(21,93,252,0.1); color: var(--info); }
.invoice-container .invoice-status .collections { background: rgba(245,74,0,0.1); color: var(--warning); }

/* Line items + ledger cards/tables */
.invoice-container .card {
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: none;
}
.invoice-container .card-header,
.invoice-container .card-title.bg-info {
    background: var(--rk-page-bg) !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--rk-card-border);
    font-size: 14px;
}
.invoice-container .table td {
    padding: 10px 16px;
    font-size: 13.5px;
    border-color: var(--rk-card-border);
    vertical-align: middle;
}
.invoice-container td.total-row { background: var(--rk-page-bg) !important; font-weight: 500; }
.invoice-container .table tr:last-child td.total-row {
    font-size: 15px;
    font-weight: 600;
    color: var(--rk-accent);
}

/* Print/download buttons */
.invoice-container .btn-group .btn-default {
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 8px !important;
    background: #fff;
    color: var(--text-lifted);
    font-size: 13px;
    padding: 7px 14px;
    margin-inline-start: 6px;
}
.invoice-container .btn-group .btn-default:hover { border-color: var(--rk-accent); color: var(--rk-accent); }

p.text-center.d-print-none a { color: var(--rk-accent); font-size: 13px; }

/* ============================================================
   AUTH PAGE (login.tpl) — minimal chrome: no topbar, a solid brand
   background, a small corner logo, and the login card centered in
   the viewport, matching the reference layout.
   ============================================================ */
.rk-auth-logo {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    z-index: 20;
}
.rk-auth-logo:hover { text-decoration: none; }
.rk-auth-logo .rk-logo-icon { height: 26px; width: auto; display: block; }
.rk-auth-logo .rk-logo-name { color: var(--text); font-size: 17px; font-weight: 600; }

body.rk-auth-page {
    background: var(--rk-page-bg);
}
body.rk-auth-page .rk-layout {
    padding-top: 0;
    min-height: 100vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* #main-body has its own opaque background (theme.css, ID selector) sized to
   its own content, not the full centered column — it showed through as a gray
   band floating independent of the (now solid) page background. */
body.rk-auth-page #main-body {
    background: transparent;
}
body.rk-auth-page .login-form {
    width: 100%;
    max-width: 420px;
    margin: 24px auto;
}
/* Shared look for every auth card (login / register / password-reset): flat,
   soft-rounded, floating on the plain page background. */
body.rk-auth-page .card {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
body.rk-auth-page .h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

/* Login form actions: checkbox on its own row, submit full-width (btn-block
   already does this) — no more float-based layout competing for space. */
.login-form .rk-remember-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}
.login-form .rk-remember-row label {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
    white-space: nowrap;
}
.login-form .rk-remember-row input[type="checkbox"] {
    position: static !important;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin: 0 !important;
}

/* ---- Register form (clientregister.tpl): same auth chrome as login, but a
   wider card holding the full personal/billing/security field set. ---- */
body.rk-auth-page .register-form {
    width: 100%;
    max-width: 620px;
    margin: 24px auto;
}
/* Bootstrap's .input-group defaults to flex-wrap:wrap; inside the two-column
   .row/.col-sm-* grid the merged icon+field can't shrink far enough and the
   prepend icon wraps onto its own line above the input. Keep merged groups on
   a single line (login is single-column so it never hit this). */
body.rk-auth-page .input-group { flex-wrap: nowrap; }

/* Section subheadings that group fields inside the auth card. */
.rk-form-section {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-lifted);
    text-transform: none;
    letter-spacing: 0;
    margin: 26px 0 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--rk-card-border);
}
.rk-form-section small { font-weight: 400; }

/* Opt-in / TOS checkbox rows — checkbox inline with its label (no float). */
.register-form .rk-optin-row {
    margin-bottom: 14px;
    font-size: 13px;
}
.register-form .rk-optin-row label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-weight: 400;
    cursor: pointer;
}
.register-form .rk-optin-row input[type="checkbox"] {
    position: static !important;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin: 3px 0 0 !important;
}

/* ---- Login via SMS (modules/addons/LoginViaSms): reuse the auth chrome and
   card look. The addon's own two-column cusp-layout/illustration is dropped in
   its client-area templates in favour of a single centered card like login. ---- */
body.rk-auth-page .rk-sms-auth {
    width: 100%;
    max-width: 440px;
    margin: 24px auto;
}
.rk-sms-auth .btn + .btn { margin-top: 10px; }
.rk-sms-auth .rk-sms-captcha {
    display: flex;
    justify-content: center;
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 16px;
}
.rk-sms-auth .rk-sms-resend { font-weight: 400; }

/* Account picker (multiple accounts share one phone number). */
.rk-sms-choice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}
.rk-sms-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--rk-card-border);
    border-radius: 10px;
    font-weight: 400;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}
.rk-sms-choice:hover { border-color: var(--rk-accent); background: var(--rk-nav-hover-bg); }
.rk-sms-choice input[type="radio"] {
    position: static !important;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 0 !important;
}

/* Resend countdown ring (markup kept from the addon; restyled to brand accent
   here so it renders even without the addon's own stylesheet). */
.rk-sms-auth .cusp-countdown-wrapper {
    margin-top: 16px;
    padding: 12px;
    text-align: center;
    transition: opacity 0.3s ease-out;
}
.rk-sms-auth .cusp-countdown {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 8px;
}
.rk-sms-auth .cusp-countdown svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.rk-sms-auth .cusp-countdown-bg {
    fill: none;
    stroke: var(--rk-card-border);
    stroke-width: 5;
}
.rk-sms-auth .cusp-countdown-progress {
    fill: none;
    stroke: url(#countdown-gradient);
    stroke-width: 5;
    stroke-dasharray: 170;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: rk-sms-countdown var(--countdown-duration) linear forwards;
    transition: stroke-dashoffset 0.1s linear;
}
.rk-sms-auth .cusp-countdown-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 22px;
    color: var(--rk-accent);
    transition: transform 0.2s ease;
}
.rk-sms-auth .cusp-countdown-wrapper p {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-lifted);
}
@keyframes rk-sms-countdown {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: 170; }
}

/* ============================================================
   TICKET DETAIL (viewticket.tpl) — professional conversation thread
   ============================================================ */
/* The right sidebar column (ticket info / CC / support menu) is dropped for
   the ticket page in header.tpl — the thread runs full-width and the ticket
   meta lives in the .rk-tk-info card above it instead. */
.rk-ticket { max-width: 100%; }

/* Ticket info card (above the thread): subject + status/id chips + actions,
   then a responsive meta grid (requester / department / priority / dates). */
.rk-tk-info {
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.rk-tk-info-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.rk-tk-info-heading { min-width: 0; }
.rk-tk-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px 22px;
    margin: 18px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--rk-card-border);
}
.rk-tk-info-item { margin: 0; min-width: 0; }
.rk-tk-info-item dt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-lifted);
    margin-bottom: 5px;
}
.rk-tk-info-item dt i { color: var(--text-muted); font-size: 11px; }
.rk-tk-info-item dd {
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
}
.rk-tk-subject {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text);
    margin: 0 0 10px;
}
.rk-tk-metabar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rk-tk-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 20px;
    background: var(--bg-lifted);
    border: 1px solid var(--rk-card-border);
    color: var(--text-lifted);
    font-size: 12.5px;
    font-weight: 500;
}
.rk-tk-chip i { font-size: 10px; }
.rk-tk-chip--status.is-open { background: rgba(0,166,62,0.1); border-color: transparent; color: var(--success-accented); }
.rk-tk-chip--status.is-closed { background: var(--bg-accented); border-color: transparent; color: var(--text-accented); }
.rk-tk-chip--status.is-open i { color: var(--success); }
.rk-tk-chip--status.is-closed i { color: var(--text-lifted); }
.rk-tk-actions { display: flex; gap: 8px; flex-shrink: 0; }

.rk-tk-closed-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 15px;
    margin-bottom: 18px;
    background: #fdf6e3;
    border: 1px solid #f0e0b6;
    border-radius: 10px;
    color: #8a6d3b;
    font-size: 13.5px;
}
.rk-tk-closed-note i { color: #d9a441; }

/* Conversation thread */
.rk-tk-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}
.rk-tk-msg { display: flex; gap: 12px; align-items: flex-start; }
.rk-tk-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-lifted);
    color: var(--text-lifted);
    font-size: 15px;
    margin-top: 2px;
}
.rk-tk-msg.is-staff .rk-tk-avatar { background: var(--rk-accent); color: #fff; }

.rk-tk-bubble {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--rk-card-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.rk-tk-msg.is-staff .rk-tk-bubble { border-color: #cfe6dd; }

.rk-tk-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 9px 16px;
    background: var(--rk-page-bg);
    border-bottom: 1px solid var(--rk-card-border);
}
.rk-tk-msg.is-staff .rk-tk-meta { background: var(--rk-nav-active-bg); border-bottom-color: #d9ece5; }
.rk-tk-author { font-size: 14px; font-weight: 500; color: var(--text); }
.rk-tk-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 20px;
    background: var(--bg-accented);
    color: var(--text-accented);
}
.rk-tk-badge--operator,
.rk-tk-badge--owner { background: var(--rk-accent-alpha); color: var(--rk-accent); }
.rk-tk-date {
    margin-inline-start: auto;
    font-size: 12px;
    color: var(--text-lifted);
    white-space: nowrap;
}

.rk-tk-body {
    padding: 16px;
    font-size: 14px;
    line-height: 2;
    color: var(--text);
    word-break: break-word;
    overflow-wrap: anywhere;
}
.rk-tk-body > *:last-child { margin-bottom: 0; }
.rk-tk-body img { max-width: 100%; height: auto; border-radius: 8px; }
.rk-tk-body pre,
.rk-tk-body code { direction: ltr; text-align: left; unicode-bidi: embed; }
.rk-tk-body pre,
.rk-tk-body pre code {
    background: var(--rk-page-bg) !important;
    color: var(--text) !important;
}
.rk-tk-body pre {
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 8px;
    padding: 12px 14px;
    overflow-x: auto;
}
.rk-tk-ip {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--rk-card-border);
    font-size: 12px;
    color: var(--text-lifted);
    direction: ltr;
    text-align: right;
}

/* Attachments */
.rk-tk-attachments {
    padding: 12px 16px;
    background: var(--rk-page-bg);
    border-top: 1px solid var(--rk-card-border);
}
.rk-tk-attachments-title { font-size: 12.5px; font-weight: 500; color: var(--text-lifted); margin-bottom: 9px; }
.rk-tk-attachment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rk-tk-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.12s, color 0.12s;
}
.rk-tk-file:hover { border-color: var(--rk-accent); color: var(--rk-accent); text-decoration: none; }
.rk-tk-file.is-removed { opacity: 0.55; cursor: default; }
.rk-tk-file-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-tk-file-dl { font-size: 11px; color: var(--text-lifted); }
.rk-tk-file:hover .rk-tk-file-dl { color: var(--rk-accent); }

/* Star rating (kept the .rating/.star markup the JS binds to; restyled here
   since the theme's rules were scoped to the old .ticket-reply wrapper). */
.rk-tk-rating { padding: 10px 16px; border-top: 1px solid var(--rk-card-border); }
.rk-tk-rating .rating,
.rk-tk-rating .rating-done {
    unicode-bidi: bidi-override;
    direction: rtl;
    display: inline-flex;
    align-items: center;
    font-size: 21px;
}
.rk-tk-rating span.star {
    font-family: "Font Awesome 6 Pro";
    font-weight: normal;
    font-style: normal;
    display: inline-block;
}
.rk-tk-rating span.star:hover { cursor: pointer; }
.rk-tk-rating span.star::before,
.rk-tk-rating .rating-done span.star::before { content: "\f005"; color: #d5cec3; }
.rk-tk-rating .rating span.star:hover::before,
.rk-tk-rating .rating span.star:hover ~ span.star::before,
.rk-tk-rating .rating-done span.star.active::before { color: #f5b301; }
.rk-tk-rating .rated { font-size: 12px; color: var(--text-lifted); margin-inline-start: 8px; }

/* Markdown editor — the WHMCS widget ships with heavy default toolbar buttons
   that clash with the light UI; normalise them to bordered light chips with a
   brand hover. Padding stays auto so the text "preview" button isn't squashed. */
.primary-content .md-editor {
    border: 1px solid var(--rk-card-border);
    border-radius: 10px;
    overflow: hidden;
}
.primary-content .md-editor > .btn-toolbar {
    padding: 8px 10px;
    background: var(--rk-page-bg) !important;
    border-bottom: 1px solid var(--rk-card-border);
}
.primary-content .md-editor .btn-group { margin: 0 2px; }
.primary-content .md-editor .btn-group > .btn,
.primary-content .md-editor .btn-toolbar > .btn {
    background: #fff !important;
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 7px !important;
    color: var(--text-lifted) !important;
    box-shadow: none !important;
    margin: 0 1px;
    padding: 5px 9px !important;
}
.primary-content .md-editor .btn-group > .btn:hover,
.primary-content .md-editor .btn-toolbar > .btn:hover {
    color: var(--rk-accent) !important;
    border-color: var(--rk-accent) !important;
}
.primary-content .md-editor .md-controls .md-control { color: var(--text-muted); }
.primary-content .md-editor .md-controls .md-control:hover { color: var(--rk-accent); }
.primary-content .md-editor > textarea.markdown-editor,
.primary-content .md-editor > .md-preview {
    border: 0 !important;
    background: #fff !important;
    min-height: 180px;
}
.primary-content .md-editor .md-footer { padding: 6px 12px; }

/* Reply form */
.rk-tk-reply { margin-top: 8px; }
.rk-tk-reply-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rk-tk-reply-title i { color: var(--rk-accent); }
.rk-tk-filehint { display: block; margin-top: 8px; }
.rk-tk-reply-actions { display: flex; gap: 10px; margin-top: 4px; }

/* File picker: the Bootstrap custom-file "Browse" pseudo-button is authored
   LTR (pinned right, English label) and collides with the RTL placeholder.
   Drop the pseudo-button — the transparent input already covers the whole
   field, so clicking the label opens the picker — and fix the RTL corner
   rounding (the theme rounds the left edge, but under RTL the field sits on
   the right with the "add more" button attached on its left). */
.primary-content .custom-file,
.primary-content .custom-file-input { cursor: pointer; }
.primary-content .custom-file-label {
    text-align: right;
    display: flex;
    align-items: center;
    color: var(--text-lifted);
    border-color: var(--rk-card-border);
}
.primary-content .custom-file-label::after { display: none; }
.primary-content .custom-file-label::before {
    content: "\f07c"; /* folder-open */
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    margin-inline-end: 8px;
    color: var(--text-muted);
}
/* With the "add more" button attached: round the field's right (start) edge. */
.primary-content .attachment-group .custom-file-label { border-radius: 0 8px 8px 0 !important; }
.primary-content .attachment-group .input-group-append > .btn { border-radius: 8px 0 0 8px !important; }
/* Extra rows have no attached button, so round both ends. */
.primary-content .file-upload .custom-file-label { border-radius: 8px !important; }

/* ============================================================
   SUBMIT TICKET — department picker (supportticketsubmit-stepone.tpl)
   Full-width page (sidebars removed in header.tpl); each department is a
   clean square tile that links straight to step two.
   ============================================================ */
.rk-dept { max-width: 100%; }
.rk-dept-head { margin-bottom: 24px; }
.rk-dept-title { font-size: 22px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.rk-dept-lead { font-size: 14px; color: var(--text-lifted); margin: 0; }

.rk-dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}
.rk-dept-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 22px 20px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.rk-dept-tile:hover,
.rk-dept-tile:focus {
    border-color: var(--rk-accent);
    box-shadow: 0 8px 24px rgba(15,110,86,0.12);
    transform: translateY(-3px);
    text-decoration: none;
    color: var(--text);
}
.rk-dept-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    font-size: 23px;
    transition: background 0.15s, color 0.15s;
}
.rk-dept-tile:hover .rk-dept-icon,
.rk-dept-tile:focus .rk-dept-icon { background: var(--rk-accent); color: #fff; }
.rk-dept-name { font-size: 15.5px; font-weight: 600; line-height: 1.5; }
.rk-dept-desc {
    font-size: 12.5px;
    color: var(--text-lifted);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rk-dept-go {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rk-page-bg);
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity 0.15s, transform 0.15s, background 0.15s, color 0.15s;
}
.rk-dept-tile:hover .rk-dept-go,
.rk-dept-tile:focus .rk-dept-go {
    opacity: 1;
    transform: translateX(0);
    background: var(--rk-accent);
    color: #fff;
}
@media (max-width: 575.98px) {
    .rk-dept-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .rk-dept-tile { aspect-ratio: auto; padding: 22px 16px; }
}

/* Submit-ticket form (supportticketsubmit-steptwo.tpl) — shares the ticket
   editor/file styling (now scoped to .primary-content) plus its own actions. */
.rk-tk-form-captcha {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    max-width: 100%;
    overflow-x: auto;
}
.rk-tk-form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 6px;
}

/* ============================================================
   SUPPORT SECTION — full-width pages, horizontal sub-nav
   ============================================================ */
/* Hides the standalone client-area "Downloads" catalog page link
   from the main/support nav (targeted by its actual URL). The old
   version of this rule also matched any element with
   menuItemName="Downloads" — which WHMCS reuses as the generic
   internal name for the *per-product* Downloads tab link in the
   productdetails sidebar too, so it was silently hiding that tab's
   sidebar link on every product/service page even when real,
   correctly-configured download files existed for it. */
.list-group-item[href*="/downloads.php"] { display: none !important; }

.rk-support-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.rk-support-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    color: var(--text-lifted);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.rk-support-nav-item i { font-size: 13px; color: var(--text-muted); }
.rk-support-nav-item:hover { border-color: var(--rk-accent); color: var(--text); text-decoration: none; }
.rk-support-nav-item:hover i { color: var(--rk-accent); }
.rk-support-nav-item.active { background: var(--rk-accent); border-color: var(--rk-accent); color: #fff; }
.rk-support-nav-item.active i { color: #fff; }

/* ---- Announcements ---- */
.rk-ann { max-width: 880px; }
.rk-ann-head { margin-bottom: 20px; }
.rk-ann-heading { font-size: 22px; font-weight: 600; color: var(--text); margin: 0; }
.rk-ann-list { display: flex; flex-direction: column; gap: 16px; }
.rk-ann-item {
    display: flex;
    gap: 16px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: border-color 0.12s, box-shadow 0.12s;
}
.rk-ann-item:hover { border-color: var(--rk-accent); box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
.rk-ann-icon {
    flex: 0 0 44px;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
}
.rk-ann-body { min-width: 0; flex: 1 1 auto; }
.rk-ann-title { display: block; font-size: 16px; font-weight: 600; color: var(--text); text-decoration: none; margin-bottom: 7px; line-height: 1.6; }
.rk-ann-title:hover { color: var(--rk-accent); text-decoration: none; }
.rk-ann-date { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-lifted); margin-bottom: 12px; }
.rk-ann-edit { color: var(--text-lifted); margin-inline-start: 10px; text-decoration: none; }
.rk-ann-summary { font-size: 13.5px; line-height: 2; color: var(--text-accented); margin-bottom: 14px; }
.rk-ann-summary > *:last-child { margin-bottom: 0; }
.rk-ann-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--rk-accent); text-decoration: none; }
.rk-ann-more:hover { text-decoration: none; }

/* ---- Knowledgebase ---- */
/* #main-body's own top padding (base theme.css: 20px) and .rk-content's
   (base custom.css rule below: 28px) are both trimmed only on KB pages —
   .rk-layout's own topbar-height padding-top is left untouched everywhere,
   since that's what clears the fixed header on every page. */
#main-body.rk-kb-page { padding-top: 0; }
#main-body.rk-kb-page .rk-content { padding-top: 5px !important; }

.rk-kb { max-width: 100%; }
.rk-kb-hero {
    margin: 0 -28px 32px;
    padding: 48px 24px 40px;
    text-align: center;
    background: radial-gradient(ellipse at 50% -10%, var(--rk-accent-alpha), transparent 65%);
    border-radius: 0 0 24px 24px;
}
.rk-kb-title { font-size: 27px; font-weight: 600; color: var(--text); margin: 0 0 14px; }
.rk-kb-subtitle { text-align: center; }
.rk-kb-search { max-width: 640px; margin: 0 auto; }

/* Premium pill-style search bar (scoped to the KB hero only).
   NOTE: the RTL input-group fix above targets buttons via
   ".input-group > .input-group-append:last-child .btn" (specificity
   0,4,0) with !important — a plain ".rk-kb-search .btn-primary" (0,2,0)
   loses that fight even with !important of its own. Every override below
   that touches height/radius/padding matches (or exceeds) that same
   selector chain so it actually wins. */
.rk-kb-search .input-group {
    align-items: center;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 999px !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    padding: 6px;
    flex-wrap: nowrap;
}
.rk-kb-search .input-group-prepend,
.rk-kb-search .input-group-append {
    display: flex;
    align-items: center;
}
.rk-kb-search .input-group-prepend .input-group-text {
    background: transparent !important;
    border: 0 !important;
    color: var(--text-muted);
    font-size: 15px;
    padding-right: 18px;
    padding-left: 4px;
}
.rk-kb-search .form-control {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 15px;
    height: auto !important;
    padding: 12px 8px;
}
.rk-kb-search .form-control:focus { background: transparent !important; box-shadow: none !important; }
.rk-kb-search .input-group > .input-group-append:last-child .btn,
.rk-kb-search .input-group-append .btn {
    border: 0 !important;
    border-radius: 999px !important;
    height: auto !important;
    padding: 13px 30px !important;
    font-weight: 500;
    white-space: nowrap;
}

.rk-kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
    justify-content: center;
    gap: 18px;
    margin-bottom: 28px;
}
.rk-kb-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.rk-kb-cat:hover { border-color: var(--rk-accent); box-shadow: 0 10px 26px rgba(0,0,0,0.07); transform: translateY(-3px); text-decoration: none; color: var(--text); }
.rk-kb-cat-top { display: flex; align-items: center; gap: 12px; }
.rk-kb-cat-icon {
    flex: 0 0 44px;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    transition: background 0.12s, color 0.12s;
}
.rk-kb-cat:hover .rk-kb-cat-icon { background: var(--rk-accent); color: #fff; }
.rk-kb-cat-name { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.rk-kb-cat-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    color: var(--text-lifted);
    line-height: 1.8;
}
.rk-kb-cat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--rk-card-border);
}
.rk-kb-cat-count { font-size: 12px; font-weight: 500; color: var(--text-lifted); white-space: nowrap; }
.rk-kb-cat-go { font-size: 12px; color: var(--text-muted); transition: transform 0.12s, color 0.12s; }
.rk-kb-cat:hover .rk-kb-cat-go { color: var(--rk-accent); transform: translateX(-3px); }
.rk-kb-popular {
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    overflow: hidden;
}
.rk-kb-popular-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: var(--text);
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rk-card-border);
}
.rk-kb-popular-title i { color: #f5b301; }
.rk-kb-articles { display: flex; flex-direction: column; }
.rk-kb-article {
    display: flex; align-items: center; gap: 11px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--rk-card-border);
    color: var(--text); text-decoration: none;
    transition: background 0.12s, color 0.12s;
}
.rk-kb-article:last-child { border-bottom: 0; }
.rk-kb-article:hover { background: var(--rk-nav-hover-bg); color: var(--rk-accent); text-decoration: none; }
.rk-kb-article > i:first-child { color: var(--text-muted); }
.rk-kb-article:hover > i:first-child { color: var(--rk-accent); }
.rk-kb-article-title { flex: 1 1 auto; font-size: 14px; font-weight: 500; }
.rk-kb-article-go { font-size: 11px; color: var(--text-muted); opacity: 0; transition: opacity 0.12s, color 0.12s; }
.rk-kb-article:hover .rk-kb-article-go { opacity: 1; color: var(--rk-accent); }

/* ---- Network status ---- */
.rk-net { max-width: 100%; }
.rk-net-hero {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 22px;
    border-radius: 14px;
    margin-bottom: 18px;
}
.rk-net-hero.is-ok { background: rgba(0,166,62,0.07); border: 1px solid rgba(0,166,62,0.22); }
.rk-net-hero.is-warn { background: rgba(245,74,0,0.07); border: 1px solid rgba(245,74,0,0.22); }
.rk-net-hero-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
}
.rk-net-hero.is-ok .rk-net-hero-icon { background: var(--success); }
.rk-net-hero.is-warn .rk-net-hero-icon { background: var(--warning); }
.rk-net-hero-text { font-size: 15px; }
.rk-net-hero.is-ok .rk-net-hero-text strong { color: var(--success-accented); font-weight: 600; }
.rk-net-hero.is-warn .rk-net-hero-text strong { color: var(--warning-accented); font-weight: 600; }
.rk-net-note {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 15px; margin-bottom: 18px;
    background: rgba(21,93,252,0.06);
    border: 1px solid rgba(21,93,252,0.18);
    border-radius: 10px;
    font-size: 13.5px; color: var(--info-accented);
}
.rk-net-note i { color: var(--info); }
.rk-net-section-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.rk-net-table { margin-top: 14px; }
.rk-net-table thead th { font-size: 11.5px; }
.rk-net-server { font-weight: 500; }
.rk-net-issue {
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 16px;
}
.rk-net-issue-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    background: var(--rk-page-bg);
    border-bottom: 1px solid var(--rk-card-border);
}
.rk-net-issue-title { font-weight: 600; font-size: 14.5px; color: var(--text); }
.rk-net-issue-status { font-size: 12.5px; color: var(--text-lifted); }
.rk-net-issue-priority { margin-inline-start: auto; }
.rk-net-issue-body { padding: 16px 18px; }
.rk-net-issue-affecting { font-size: 14px; margin-bottom: 10px; }
.rk-net-issue-meta {
    list-style: none; margin: 0 0 10px; padding: 0;
    display: flex; flex-wrap: wrap; gap: 18px;
    font-size: 12.5px; color: var(--text-lifted);
}
.rk-net-issue-meta i { color: var(--text-muted); }
.rk-net-affected {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; margin-bottom: 12px;
    background: rgba(245,74,0,0.08);
    border-radius: 8px;
    color: var(--warning-accented); font-size: 13px;
}
.rk-net-affected i { color: var(--warning); }
.rk-net-empty { padding: 24px; text-align: center; color: var(--text-lifted); }

/* ---- Single article (announcement view / knowledgebase article) ---- */
.rk-article {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 16px;
    padding: 30px 34px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.rk-article-voted {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 15px;
    margin-bottom: 20px;
    background: rgba(0,166,62,0.08);
    border: 1px solid rgba(0,166,62,0.2);
    border-radius: 10px;
    color: var(--success-accented);
    font-size: 13.5px;
}
.rk-article-voted i { color: var(--success); }
.rk-article-head {
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--rk-card-border);
}
.rk-article-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.rk-article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--rk-accent);
    background: var(--rk-accent-alpha);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.rk-article-head-top .rk-article-badge { margin-bottom: 0; }
.rk-article-title {
    font-size: 25px;
    font-weight: 600;
    line-height: 1.65;
    color: var(--text);
    margin: 0 0 14px;
}
.rk-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--text-lifted);
}
.rk-article-meta i { color: var(--text-muted); margin-inline-end: 5px; }
.rk-article-body {
    font-size: 15px;
    line-height: 2.15;
    color: var(--text-accented);
}
.rk-article-body p { margin-bottom: 1.15em; }
.rk-article-body > *:last-child { margin-bottom: 0; }
.rk-article-body img { max-width: 100%; height: auto; border-radius: 10px; }
.rk-article-body ul,
.rk-article-body ol { padding-inline-start: 22px; margin-bottom: 1.15em; }
.rk-article-body li { margin-bottom: 0.4em; }
.rk-article-body h1, .rk-article-body h2, .rk-article-body h3, .rk-article-body h4 {
    color: var(--text);
    font-weight: 600;
    margin: 1.4em 0 0.6em;
    line-height: 1.6;
}
.rk-article-body pre,
.rk-article-body pre code {
    background: var(--rk-page-bg) !important;
    color: var(--text) !important;
}
.rk-article-body pre {
    direction: ltr;
    text-align: left;
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 10px;
    padding: 14px 16px;
    overflow-x: auto;
    font-size: 13px;
}
.rk-article-body blockquote {
    border-inline-start: 3px solid var(--rk-accent);
    background: var(--rk-page-bg);
    margin: 0 0 1.15em;
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    color: var(--text-lifted);
}

.rk-article-helpful {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 26px;
    padding: 16px 18px;
    background: var(--rk-page-bg);
    border-radius: 12px;
}
.rk-article-helpful-q { font-size: 14px; font-weight: 500; color: var(--text); }
.rk-article-helpful-btns { display: flex; gap: 8px; margin: 0; }

.rk-article-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--rk-card-border);
}

.rk-article-related {
    max-width: 820px;
    margin: 18px auto 0;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    overflow: hidden;
}
.rk-article-related-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rk-card-border);
}
.rk-article-related-title i { color: var(--rk-accent); }

@media (max-width: 575.98px) {
    .rk-article { padding: 22px 18px; }
    .rk-article-title { font-size: 21px; }
}

/* ---- Knowledgebase category page extras ---- */
.rk-kb-subtitle { font-size: 14px; color: var(--text-lifted); margin: 0 0 16px; line-height: 1.9; }
.rk-kb-popular-title--plain i { color: var(--rk-accent); }
.rk-kb-article--rich { align-items: flex-start; padding: 15px 20px; }
.rk-kb-article--rich > i:first-child { margin-top: 3px; }
.rk-kb-article-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rk-kb-article--rich .rk-kb-article-title { font-size: 14.5px; }
.rk-kb-article-snippet {
    font-size: 12.5px;
    color: var(--text-lifted);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rk-kb-article--rich:hover .rk-kb-article-snippet { color: var(--text-lifted); }
.rk-kb-article--rich .rk-kb-article-go { align-self: center; }
.rk-kb-article--empty { color: var(--text-lifted); justify-content: center; cursor: default; }
.rk-kb-back { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; }

/* ---- Knowledgebase — sidebar navigation (category > article tree) ---- */
.rk-kb-layout { display: flex; align-items: flex-start; gap: 28px; }
.rk-kb-main { flex: 1 1 auto; min-width: 0; }
.rk-kb-main .rk-article,
.rk-kb-main .rk-article-related { max-width: none; margin-left: 0; margin-right: 0; }
.rk-kb-main .rk-article-related { margin-top: 18px; }

.rk-kb-sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: calc(var(--rk-topbar-h) + 20px);
    max-height: calc(100vh - var(--rk-topbar-h) - 40px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    padding: 8px;
}
.rk-kb-sidebar-heading {
    padding: 10px 8px 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--rk-card-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-lifted);
}
.rk-kb-sidebar-empty { padding: 10px; font-size: 13px; color: var(--text-lifted); }
.rk-kb-sidebar-cat { border-bottom: 1px solid var(--rk-card-border); }
.rk-kb-sidebar-cat:last-child { border-bottom: 0; }
.rk-kb-sidebar-cat-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 8px;
    cursor: pointer;
    list-style: none;
}
.rk-kb-sidebar-cat-title::marker,
.rk-kb-sidebar-cat-title::-webkit-details-marker { display: none; }
.rk-kb-sidebar-cat-link { font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; }
.rk-kb-sidebar-cat-link:hover { color: var(--rk-accent); text-decoration: none; }
.rk-kb-sidebar-cat.is-active > .rk-kb-sidebar-cat-title .rk-kb-sidebar-cat-link { color: var(--rk-accent); }
.rk-kb-sidebar-caret { font-size: 11px; color: var(--text-muted); transition: transform 0.15s; flex-shrink: 0; }
.rk-kb-sidebar-cat[open] > .rk-kb-sidebar-cat-title .rk-kb-sidebar-caret { transform: rotate(180deg); }
.rk-kb-sidebar-cat-body { padding: 0 8px 10px; }
.rk-kb-sidebar-cat-body .rk-kb-sidebar-cat { padding-inline-start: 12px; }
.rk-kb-sidebar-articles { list-style: none; margin: 0; padding: 0; }
.rk-kb-sidebar-article {
    display: block;
    padding: 7px 10px;
    margin-inline-start: 4px;
    border-inline-start: 2px solid transparent;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-lifted);
    text-decoration: none;
}
.rk-kb-sidebar-article:hover { color: var(--rk-accent); text-decoration: none; }
.rk-kb-sidebar-article.is-active {
    color: var(--rk-accent);
    font-weight: 500;
    border-inline-start-color: var(--rk-accent);
    background: var(--rk-accent-alpha);
    border-radius: 0 8px 8px 0;
}

@media (max-width: 991.98px) {
    .rk-kb-layout { flex-direction: column; }
    .rk-kb-sidebar { position: static; max-height: none; width: 100%; }
}

/* ============================================================
   STORE / ORDER — product group listing (standard_cart products.tpl)
   Sidebar categories are hidden (rules above); the products render as a
   clean, centered pricing-card grid.
   ============================================================ */
#order-standard_cart .sidebar-collapsed { display: none !important; }
#order-standard_cart .cart-body { padding: 0 !important; }

#order-standard_cart .header-lined {
    text-align: center;
    border: 0;
    margin: 0 0 30px;
    padding: 0;
}
#order-standard_cart .header-lined h1 {
    font-size: 26px !important;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
#order-standard_cart .header-lined p {
    font-size: 15px;
    color: var(--text-lifted);
    margin: 8px 0 0;
}

#order-standard_cart .rk-product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 22px;
    max-width: 1160px;
    margin: 0 auto;
}
#order-standard_cart .rk-product-cell {
    display: flex;
    flex: 0 1 340px;
}
#order-standard_cart .product {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 16px;
    padding: 26px 24px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
#order-standard_cart .product:hover {
    border-color: var(--rk-accent);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}
#order-standard_cart .product > header {
    text-align: center;
    padding-bottom: 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--rk-card-border);
}
#order-standard_cart .product > header span[id$="-name"] {
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
}
#order-standard_cart .product > header .qty {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-lifted);
}
#order-standard_cart .product-desc { flex: 1 1 auto; padding-top: 14px; }
#order-standard_cart .product-desc > p {
    font-size: 13.5px;
    color: var(--text-lifted);
    text-align: center;
    line-height: 1.9;
    margin: 0 0 14px;
}
#order-standard_cart .product-desc ul { list-style: none; margin: 0; padding: 0; }
#order-standard_cart .product-desc ul li {
    position: relative;
    padding: 9px 24px 9px 2px;
    padding-inline-start: 24px;
    padding-inline-end: 2px;
    font-size: 14px;
    color: var(--text-accented);
    border-bottom: 1px dashed var(--rk-card-border);
}
#order-standard_cart .product-desc ul li:last-child { border-bottom: 0; }
#order-standard_cart .product-desc ul li::before {
    content: "\2713";
    position: absolute;
    inset-inline-start: 0;
    top: 9px;
    color: var(--success);
    font-weight: 700;
    font-size: 13px;
}
#order-standard_cart .product-desc .feature-value { font-weight: 600; color: var(--text); }
#order-standard_cart .product > footer { margin-top: 20px; }
#order-standard_cart .product-pricing {
    text-align: center;
    margin-bottom: 18px;
    font-size: 12.5px;
    color: var(--text-lifted);
    line-height: 1.7;
}
#order-standard_cart .product-pricing .price {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}
#order-standard_cart .product-pricing small { color: var(--text-lifted); }
#order-standard_cart .btn-order-now {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--rk-accent) !important;
    border: 0 !important;
    border-radius: 10px !important;
    padding: 12px !important;
    font-size: 14px;
    font-weight: 500;
    color: #fff !important;
    transition: background 0.15s;
}
#order-standard_cart .btn-order-now:hover { background: var(--rk-accent-dark) !important; }

/* Store: horizontal product-group nav (replaces the category sidebar). */
#order-standard_cart .rk-store-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 26px;
}
#order-standard_cart .rk-store-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    color: var(--text-lifted);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}
#order-standard_cart .rk-store-nav-item i { font-size: 13px; color: var(--text-muted); }
#order-standard_cart .rk-store-nav-item:hover { border-color: var(--rk-accent); color: var(--text); text-decoration: none; }
#order-standard_cart .rk-store-nav-item:hover i { color: var(--rk-accent); }
#order-standard_cart .rk-store-nav-item.active { background: var(--rk-accent); border-color: var(--rk-accent); color: #fff; }
#order-standard_cart .rk-store-nav-item.active i { color: #fff; }

/* ============================================================
   PRODUCT / SERVICE DETAILS (clientareaproductdetails.tpl)
   Single service view: hero + billing facts in one card, a pill
   sub-nav for module/domain/config/metrics info, and dedicated
   layouts for the Downloads (file/version releases), Addons and
   Change Password tabs.
   ============================================================ */
.rk-pd-card {
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.rk-pd-card--form { max-width: 680px; }

/* ---- Hero: icon, name, status, actions ---- */
.rk-pd-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.rk-pd-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rk-pd-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.rk-pd-hero-text { min-width: 0; }
.rk-pd-hero-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rk-pd-name { font-size: 20px; font-weight: 600; color: var(--text); margin: 0; line-height: 1.4; }
.rk-pd-group { font-size: 13px; color: var(--text-lifted); margin-top: 4px; }

.rk-pd-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.rk-pd-status--pending,
.rk-pd-status--pending-transfer { background: rgba(245,74,0,0.1); color: var(--warning-accented); }
.rk-pd-status--active { background: rgba(0,166,62,0.1); color: var(--success-accented); }
.rk-pd-status--suspended { background: rgba(21,93,252,0.1); color: var(--info-accented); }
.rk-pd-status--terminated,
.rk-pd-status--cancelled { background: var(--bg-accented); color: var(--text-accented); }
.rk-pd-status--fraud { background: var(--bg-inverted); color: #fff; }

.rk-pd-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.rk-pd-action { display: inline-flex; align-items: center; gap: 7px; border-radius: 8px !important; }

/* ---- Key/value grid (billing facts on overview + module/domain info) ---- */
.rk-pd-kv {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px 22px;
    margin: 0;
    padding: 0;
}
.rk-pd-kv--billing { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rk-card-border); }
.rk-pd-kv-item { margin: 0; min-width: 0; }
.rk-pd-kv-item dt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-lifted);
    margin-bottom: 5px;
}
.rk-pd-kv-item dt i { color: var(--text-muted); font-size: 11px; }
.rk-pd-kv-item dd {
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    overflow-wrap: anywhere;
}
.rk-pd-kv-item--warn dd { color: var(--warning-accented); }

/* ---- Downloads teaser: surfaces the Downloads tab on Overview so
   clients don't have to know it exists in the sidebar first. ---- */
.rk-pd-dl-teaser {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    background: var(--rk-accent-alpha);
    border: 1px solid rgba(15,110,86,0.18);
    border-radius: 14px;
    flex-wrap: wrap;
    text-decoration: none;
    transition: box-shadow 0.12s;
}
.rk-pd-dl-teaser:hover { box-shadow: 0 4px 14px rgba(15,110,86,0.12); text-decoration: none; }
.rk-pd-dl-teaser-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--rk-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.rk-pd-dl-teaser-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rk-pd-dl-teaser-title { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.rk-pd-dl-teaser-desc { font-size: 12.5px; color: var(--text-lifted); }
.rk-pd-dl-teaser-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--rk-accent);
    pointer-events: none;
}
.rk-pd-dl-teaser-btn i { font-size: 12px; transition: transform 0.15s; }
.rk-pd-dl-teaser:hover .rk-pd-dl-teaser-btn i { transform: translateX(-3px); }

/* ---- Inner sub-nav (domain / manage / config options / metrics / custom fields) ---- */
.rk-pd-innernav.nav-tabs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    border-bottom: 0 !important;
}
.rk-pd-innernav.nav-tabs .nav-item { margin: 0 !important; }
.rk-pd-innernav.nav-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 10px !important;
    background: #fff !important;
    border: 1px solid var(--rk-card-border) !important;
    color: var(--text-lifted) !important;
    font-size: 13.5px;
    font-weight: 500;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.rk-pd-innernav.nav-tabs .nav-link i { font-size: 12px; color: var(--text-muted); }
.rk-pd-innernav.nav-tabs .nav-link:hover { border-color: var(--rk-accent) !important; color: var(--text) !important; }
.rk-pd-innernav.nav-tabs .nav-link.active {
    background: var(--rk-accent) !important;
    border-color: var(--rk-accent) !important;
    color: #fff !important;
}
.rk-pd-innernav.nav-tabs .nav-link.active i { color: #fff; }

.rk-pd-panel {
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    padding: 20px 22px;
    margin: 0;
}
.rk-pd-domain-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px !important; }

/* ---- Section heading shared by Downloads / Addons / Change password ---- */
.rk-pd-section-head { margin-bottom: 18px; }
.rk-pd-section-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 5px;
}
.rk-pd-section-head h3 i { color: var(--rk-accent); font-size: 16px; }
.rk-pd-section-lead { font-size: 13.5px; color: var(--text-lifted); margin: 0; }

.rk-pd-empty {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-lifted);
    background: #fff;
    border: 1px dashed var(--rk-card-border);
    border-radius: 14px;
}
.rk-pd-empty i { display: block; font-size: 30px; color: var(--text-muted); margin-bottom: 12px; }
.rk-pd-empty p { margin: 0; font-size: 13.5px; }

/* ---- Downloads tab: file/version release list ---- */
.rk-pd-versions { display: flex; flex-direction: column; gap: 14px; }
.rk-pd-version {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: border-color 0.12s, box-shadow 0.12s;
}
.rk-pd-version:hover { border-color: var(--rk-accent); box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
.rk-pd-version--latest { border-color: var(--rk-accent); background: var(--rk-accent-alpha); }
.rk-pd-version-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.rk-pd-version--latest .rk-pd-version-icon { background: var(--rk-accent); color: #fff; }
.rk-pd-version-body { flex: 1 1 auto; min-width: 0; }
.rk-pd-version-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}
.rk-pd-version-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--rk-accent);
    color: #fff;
}
.rk-pd-version-desc { font-size: 13px; line-height: 1.8; color: var(--text-lifted); }
.rk-pd-version-desc > *:last-child { margin-bottom: 0; }
.rk-pd-version-dl {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 8px !important;
}
@media (max-width: 575.98px) {
    .rk-pd-version { flex-wrap: wrap; }
    .rk-pd-version-dl { width: 100%; justify-content: center; }
}

/* ---- Addons tab ---- */
.rk-pd-addons { display: flex; flex-direction: column; gap: 14px; }
.rk-pd-addon {
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.rk-pd-addon-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 18px;
    background: var(--rk-page-bg);
    border-bottom: 1px solid var(--rk-card-border);
}
.rk-pd-addon-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.rk-pd-addon-body { padding: 16px 18px; }
.rk-pd-addon-body p { margin: 0 0 6px; font-size: 13.5px; color: var(--text); }
.rk-pd-addon-body p.text-muted { font-size: 12.5px; color: var(--text-lifted) !important; }
.rk-pd-addon-body p:last-child { margin-bottom: 0; }
.rk-pd-addon-footer { padding: 12px 18px; border-top: 1px solid var(--rk-card-border); }

/* ---- Change password tab ---- */
.rk-pd-pwform .generate-password { border-radius: 8px; }

/* ============================================================
   SOFTWARE LICENSING MODULE (modules/servers/licensing/templates/
   managelicense.tpl) — rendered as $moduleclientarea inside the
   "manage" tab of the product details page. Reissue/Cancel/Upgrade
   buttons and the billing/regdate/customfields facts are dropped
   entirely from this template: the parent rk-pd-card hero already
   shows all of that (Reissue is the only action unique to a
   license, so it's the only button kept here). Left is just the
   license-specific data, laid out with the same rk-pd-kv dt/dd
   grid the rest of this page already uses.
   ============================================================ */
.rk-lic-card { padding-bottom: 8px; }
.rk-pd-kv--stacked { grid-template-columns: 1fr; row-gap: 14px; }
.rk-pd-kv-item--full { grid-column: 1 / -1; }
.rk-pd-kv-item--muted dd { color: var(--text-muted); }

.rk-lic-key { display: flex; align-items: center; gap: 8px; max-width: 480px; }
.rk-lic-key-input {
    flex: 1 1 auto;
    min-width: 0;
    font-family: monospace;
    font-size: 13px;
    color: var(--text);
    background: var(--rk-page-bg);
    border: 1px solid var(--rk-card-border);
    border-radius: 8px;
    padding: 8px 12px;
}
.rk-lic-key-copy {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rk-card-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}
.rk-lic-key-copy:hover { border-color: var(--rk-accent); background: var(--rk-accent-alpha); }
.rk-lic-key-copy img { opacity: 0.6; }

.rk-lic-hint { margin: 8px 0 0; font-size: 12.5px; }
.rk-lic-mono { font-family: monospace; font-size: 13px; white-space: pre-line; }
.rk-lic-suspend-reason { font-size: 12.5px; color: var(--warning-accented); margin-inline-start: 6px; }

.rk-pd-status--reissued { background: rgba(0,166,62,0.1); color: var(--success-accented); }
.rk-pd-status--expired { background: var(--bg-accented); color: var(--text-accented); }

/* ============================================================
   DOMAIN DETAILS (clientareadomaindetails.tpl) — reuses the
   .rk-pd-* hero/card/kv-grid language from the product details
   page for visual consistency; this section only covers the
   pieces unique to domains (the "what would you like to do today"
   action list, the autorenew/reglock toggle-status cards, the
   nameserver radio choice, and the domain addon rows).
   ============================================================ */
.rk-dm-module-output { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rk-card-border); }

/* ---- "Do today" action list ---- */
.rk-dm-actions { display: flex; flex-direction: column; gap: 10px; }
.rk-dm-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: border-color 0.12s, box-shadow 0.12s;
}
.rk-dm-action:hover { border-color: var(--rk-accent); box-shadow: 0 4px 14px rgba(0,0,0,0.05); color: var(--text); text-decoration: none; }
.rk-dm-action-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.rk-dm-action-label { flex: 1 1 auto; font-size: 14px; font-weight: 500; }
.rk-dm-action-go { font-size: 12px; color: var(--text-muted); transition: transform 0.15s, color 0.15s; }
.rk-dm-action:hover .rk-dm-action-go { transform: translateX(-3px); color: var(--rk-accent); }

/* ---- Autorenew / registrar-lock: centered toggle-status card ---- */
.rk-dm-status-card { max-width: 460px; margin: 0 auto; text-align: center; }
.rk-dm-status-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.rk-dm-status-icon--on { background: rgba(0,166,62,0.12); color: var(--success); }
.rk-dm-status-icon--off { background: var(--bg-accented); color: var(--text-muted); }
.rk-dm-status-title { font-size: 17px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.rk-dm-status-desc { font-size: 13px; color: var(--text-lifted); margin: 0 0 16px; line-height: 1.8; }
.rk-dm-status-pill { display: inline-flex; margin-bottom: 18px; }
.rk-dm-status-form { margin: 0; }

/* ---- Overview: at-a-glance autorenew/reglock tiles (link into
   their real tabs — no duplicated toggle logic here). ---- */
.rk-dm-status-tiles { margin-bottom: 20px; }
.rk-dm-status-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: border-color 0.12s, box-shadow 0.12s;
}
.rk-dm-status-tile:hover { border-color: var(--rk-accent); box-shadow: 0 4px 14px rgba(0,0,0,0.05); color: var(--text); text-decoration: none; }
.rk-dm-status-tile:hover .rk-dm-action-go { transform: translateX(-3px); color: var(--rk-accent); }
.rk-dm-status-tile-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.rk-dm-status-tile-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rk-dm-status-tile-label { font-size: 13px; font-weight: 500; color: var(--text-lifted); }
.rk-dm-status-tile .rk-pd-status { align-self: flex-start; }

/* ---- Nameserver default/custom radio choice ---- */
.rk-dm-ns-choice { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.rk-dm-ns-choice-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--rk-card-border);
    border-radius: 10px;
    font-weight: 400;
    font-size: 13.5px;
    color: var(--text-lifted);
    cursor: pointer;
    margin: 0;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.rk-dm-ns-choice-item input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.rk-dm-ns-choice-check { color: var(--border-lifted); font-size: 15px; }
/* Reacts live to the native :checked state (rather than a
   server-rendered class) so the highlight updates immediately when
   the user picks the other option, before the form is even submitted. */
.rk-dm-ns-choice-item:has(input:checked) {
    border-color: var(--rk-accent);
    background: var(--rk-accent-alpha);
    color: var(--text);
    font-weight: 500;
}
.rk-dm-ns-choice-item:has(input:checked) .rk-dm-ns-choice-check { color: var(--rk-accent); }
.rk-dm-ns-fields { padding-top: 4px; }

/* ---- Domain addons (ID protection / DNS management / email forwarding) ---- */
.rk-dm-addons { display: flex; flex-direction: column; gap: 14px; }
.rk-dm-addon {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--rk-card-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    flex-wrap: wrap;
}
.rk-dm-addon-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}
.rk-dm-addon-body { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rk-dm-addon-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.rk-dm-addon-desc { font-size: 12.5px; color: var(--text-lifted); line-height: 1.7; }
.rk-dm-addon-action { flex-shrink: 0; display: flex; align-items: center; gap: 8px; margin: 0; }
.rk-dm-addon-action .btn-outline-default {
    border: 1px solid var(--rk-card-border);
    color: var(--text-lifted);
    background: #fff;
}
.rk-dm-addon-action .btn-outline-default:hover { border-color: var(--rk-accent); color: var(--text); }

@media (max-width: 575.98px) {
    .rk-dm-addon { flex-direction: column; align-items: flex-start; text-align: right; }
    .rk-dm-addon-action { width: 100%; justify-content: flex-start; }
}

/* ============================================================
   SECONDARY SIDEBAR (includes/sidebar.tpl) — the plain "review /
   actions" card stack shown next to product/domain/ssl/invoice
   detail pages. Previously totally unstyled core Bootstrap markup
   (squished icon+label, default blue active state, bare chevron);
   restyled to read like the primary .rk-nav menu inside a card.
   List-page contexts (.rk-list-toolbar) render this same partial
   as a horizontal pill bar and already have their own overrides
   above — this section only touches the plain vertical `.sidebar`
   wrapper used everywhere else, so the two never collide.
   ============================================================ */
.sidebar .card-sidebar {
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    overflow: hidden;
}
.sidebar .card-sidebar .card-header {
    padding: 11px 16px !important;
    background: var(--rk-page-bg) !important;
    border-bottom: 1px solid var(--rk-card-border) !important;
}
.sidebar .card-sidebar .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-lifted) !important;
}
.sidebar .card-sidebar .card-title > i:first-child { color: var(--rk-accent); font-size: 13px; }
.sidebar .card-sidebar .card-title .badge {
    font-size: 11px !important;
    font-weight: 500;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    background: var(--rk-accent-alpha) !important;
    color: var(--rk-accent) !important;
}
.sidebar .card-sidebar .card-minimise {
    margin-inline-start: auto;
    font-size: 11px;
    color: var(--text-muted);
}
.sidebar .card-sidebar .card-minimise:hover { color: var(--rk-accent); }

.sidebar .card-sidebar .list-group {
    padding: 6px;
    gap: 2px;
}
.sidebar .card-sidebar .list-group-item {
    border: 0 !important;
    border-radius: 8px !important;
    padding: 9px 10px !important;
    margin: 0 !important;
    background: transparent !important;
    color: var(--rk-nav-color) !important;
    font-size: 13.5px;
    transition: background 0.12s, color 0.12s;
}
.sidebar .card-sidebar .list-group-item:hover,
.sidebar .card-sidebar .list-group-item:focus {
    background: var(--rk-nav-hover-bg) !important;
    color: #111 !important;
}
.sidebar .card-sidebar .list-group-item.active {
    background: var(--rk-nav-active-bg) !important;
    color: var(--rk-nav-active-fg) !important;
    font-weight: 500;
}
.sidebar .card-sidebar .list-group-item.disabled { opacity: var(--disabled-opacity); cursor: default; }

.sidebar .card-sidebar .sidebar-menu-item-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar .card-sidebar .sidebar-menu-item-icon-wrapper {
    flex: 0 0 18px;
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar .card-sidebar .sidebar-menu-item-icon {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.12s;
}
.sidebar .card-sidebar .list-group-item:hover .sidebar-menu-item-icon,
.sidebar .card-sidebar .list-group-item.active .sidebar-menu-item-icon { color: var(--rk-accent); }
.sidebar .card-sidebar .sidebar-menu-item-label { flex: 1 1 auto; min-width: 0; }
.sidebar .card-sidebar .sidebar-menu-item-badge { flex-shrink: 0; }
.sidebar .card-sidebar .sidebar-menu-item-badge .badge,
.sidebar .card-sidebar .list-group-item .badge {
    font-size: 11px !important;
    font-weight: 500;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    background: var(--bg-accented) !important;
    color: var(--text-accented) !important;
}
.sidebar .card-sidebar .list-group-item.active .badge {
    background: rgba(255,255,255,0.55) !important;
    color: var(--rk-accent) !important;
}

.sidebar .card-sidebar .card-body { padding: 14px 16px; font-size: 13px; color: var(--text-lifted); }
.sidebar .card-sidebar .card-footer {
    padding: 10px 16px 14px !important;
    font-size: 12.5px;
    background: #fff !important;
    border-top: 1px solid var(--rk-card-border) !important;
}

/* Mobile "select" fallback variant of the same panel (sidebar.tpl's
   d-block d-md-none branch) — the plain native <select> just needs
   the shared form-control look, not a full menu restyle. */
.sidebar .card.d-block.d-md-none {
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 12px !important;
}
.sidebar .card.d-block.d-md-none .card-header {
    background: var(--rk-page-bg) !important;
    border-bottom: 1px solid var(--rk-card-border) !important;
}

/* ============================================================
   cPANEL CLIENT-AREA DASHBOARD (modules/servers/cpanel/templates/
   overview.tpl) — WHMCS's own bundled hosting-account widget set,
   rendered as $moduleclientarea inside .module-client-area on the
   product details "manage" tab. Rebuilt as a proper bespoke panel
   (rk-cp-* classes) instead of a thin skin over the stock Bootstrap
   markup: bitmap shortcut icons replaced with FontAwesome badges,
   the jQuery Knob radial dials replaced with flat progress meters
   (avoids a known RTL canvas-positioning glitch too), and the
   package/domain block turned into a proper icon+details card.
   The "Additional Info" (custom fields) panel was removed from
   this template entirely per request — it doesn't belong on this
   page. Every element ID/class that modules/servers/cpanel/js/
   client.js binds to (WordPress installer, quick email form) is
   left exactly as-is; only presentation changed.
   ============================================================ */
[id^="cPanel"].card { margin-bottom: 16px !important; }
[id^="cPanel"] > .card-header i:first-child { color: var(--rk-accent); margin-inline-end: 6px; font-size: 14px; }

/* Package/domain + usage-stats sit side by side as the two top
   columns of the same Bootstrap row, which already stretches both
   columns to equal height (flex row default) — the cards inside
   just need to fill that height themselves instead of shrinking
   to their own content. */
#cPanelPackagePanel,
#cPanelUsagePanel { height: calc(100% - 1rem); }
#cPanelPackagePanel .card-body,
#cPanelUsagePanel .card-body { height: 100%; }
.rk-cp-package-body { height: 100%; }

/* ---- Package / domain summary ---- */
.rk-cp-package-body {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: right;
    flex-wrap: wrap;
}
.rk-cp-package-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.rk-cp-package-details { flex: 1 1 auto; min-width: 0; margin: 0; }
.rk-cp-package-details em {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: var(--text-lifted);
    margin-bottom: 2px;
}
.rk-cp-package-details h4 {
    font-size: 17px !important;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}
.rk-cp-domain-link { color: var(--rk-accent); font-size: 13px; direction: ltr; display: inline-block; }
.rk-cp-domain-link i { font-size: 12px; }
.rk-cp-package-actions { flex: 0 0 100%; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Usage stats: flat meters (replaces jQuery Knob dials) ---- */
.rk-cp-usage-body { display: flex; flex-direction: column; gap: 18px; }
.rk-cp-meter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}
.rk-cp-meter-label { color: var(--text-lifted); font-weight: 500; }
.rk-cp-meter-label i { color: var(--rk-accent); margin-inline-end: 6px; }
.rk-cp-meter-value { color: var(--text); font-weight: 600; font-size: 12.5px; direction: ltr; unicode-bidi: embed; }
.rk-cp-meter-track {
    height: 8px;
    border-radius: 20px;
    background: var(--rk-page-bg);
    overflow: hidden;
}
.rk-cp-meter-fill { height: 100%; border-radius: 20px; background: var(--rk-accent); transition: width 0.4s ease; }
.rk-cp-meter-fill--alt { background: var(--warning); }
.limit-near {
    margin-top: 4px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
}
.text-info.limit-near { background: var(--rk-page-bg); color: var(--text-lifted); }
.text-danger.limit-near { background: rgba(231,0,11,0.08); color: var(--error-accented); }
.text-danger.limit-near .btn { margin-inline-start: 8px; }

/* ---- Quick shortcuts grid ----
   Fixed column counts per breakpoint (rather than auto-fill) so
   tiles stay wide enough for the longest label ("پاسخ دهندگان
   خودکار") to fit on one line — auto-fill packed too many narrow
   columns on wide screens and wrapped labels everywhere else. */
.cpanel-feature-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 0;
}
@media (min-width: 576px) {
    .cpanel-feature-row { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
    .cpanel-feature-row { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
    .cpanel-feature-row { grid-template-columns: repeat(5, 1fr); }
}
.cpanel-feature-row > div {
    padding: 0 !important;
    max-width: none !important;
    flex: none !important;
    width: auto !important;
}
.cpanel-feature-row a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 22px 10px !important;
    border: 1px solid var(--rk-card-border) !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: var(--text-accented) !important;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.cpanel-feature-row a:hover {
    border-color: var(--rk-accent) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
    color: var(--text) !important;
    text-decoration: none;
}
.rk-cp-feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--rk-accent-alpha);
    color: var(--rk-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.12s, color 0.12s;
}
.cpanel-feature-row a:hover .rk-cp-feature-icon { background: var(--rk-accent); color: #fff; }
.rk-cp-feature-label { font-size: 12px; }

/* ---- WordPress panel ---- */
#cPanelWordPress h5 { font-size: 13.5px; font-weight: 500; color: var(--text-lifted); margin-bottom: 4px; }
#cPanelWordPress #newWordPressFullUrlPreview {
    direction: ltr;
    text-align: right;
    color: var(--text-muted);
    font-size: 12px;
}
#cPanelWordPress .row + .row { margin-top: 14px; }
#cPanelWordPress .row > div { margin-top: 6px; }
.rk-cp-field-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-lifted);
    margin-bottom: 5px;
}
.rk-cp-field-label--ltr { direction: ltr; text-align: right; }
.rk-cp-btn-with-label { display: flex; align-items: center; justify-content: center; gap: 7px; }
#btnInstallWordpress.rk-cp-btn-install {
    background: var(--rk-accent) !important;
    border-color: var(--rk-accent) !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
#btnInstallWordpress.rk-cp-btn-install:hover {
    background: var(--rk-accent-dark) !important;
    border-color: var(--rk-accent-dark) !important;
}

/* ---- Quick email creation ---- */
#cPanelQuickEmailPanel .input-group-text { background: var(--rk-page-bg); color: var(--text-lifted); font-size: 13px; }

/* ---- Billing overview / configurable options: plain Bootstrap
   label+value rows → clean space-between rows. ---- */
#cPanelBillingOverviewPanel .row[id],
#cPanelConfigurableOptionsPanel .card-body > .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rk-card-border);
    margin: 0;
}
#cPanelBillingOverviewPanel .row[id]:last-child,
#cPanelConfigurableOptionsPanel .card-body > .row:last-child { border-bottom: 0; }
#cPanelBillingOverviewPanel .row[id] > div:first-child,
#cPanelConfigurableOptionsPanel .card-body > .row > div:first-child {
    flex: 0 0 auto;
    text-align: inherit !important;
    font-size: 12.5px;
    color: var(--text-lifted);
}
#cPanelBillingOverviewPanel .row[id] > div:first-child i { color: var(--text-muted); margin-inline-end: 5px; }
#cPanelBillingOverviewPanel .row[id] > div:last-child,
#cPanelConfigurableOptionsPanel .card-body > .row > div:last-child {
    text-align: inherit !important;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
}
#cPanelBillingOverviewPanel .row[id] strong,
#cPanelConfigurableOptionsPanel .card-body > .row strong { font-weight: 500; color: var(--text-lifted); }
#cPanelBillingOverviewPanel > .card-body > .row > div { margin-bottom: 0; }

/* ---- Addons/extras purchase ---- */
#cPanelExtrasPurchasePanel .form-inline { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#cPanelExtrasPurchasePanel select { flex: 1 1 200px; }

@media (max-width: 575.98px) {
    .rk-cp-package-body { text-align: center; justify-content: center; }
    .rk-cp-package-actions { justify-content: center; }
}
/* Below Bootstrap's md breakpoint, .col-md-6 stacks to full width —
   the equal-height fix only makes sense while the two cards are
   actually side by side. */
@media (max-width: 767.98px) {
    #cPanelPackagePanel, #cPanelUsagePanel { height: auto; }
}
