/* ==========================================================================
   SepantaPixel — Premium WHMCS Client Area Design System v2
   Brand: #E11D48 · Type: Vazirmatn / JetBrains Mono · Full RTL · Light+Dark
   Inspired by the design language of Linear, Vercel, Stripe and Apple.
   --------------------------------------------------------------------------
   01. Fonts                06. Buttons            11. Alerts / badges
   02. Design tokens        07. Forms              12. Tabs
   03. Base & typography    08. Cards & surfaces   13. Tables & DataTables
   04. Utilities            09. Header & nav       14. Modals & dropdowns
   05. Layout scaffolding   10. Breadcrumb         15. …page layers follow
   ========================================================================== */

/* ==========================================================================
   01. FONTS
   ========================================================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains/JetBrainsMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains/JetBrainsMono-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains/JetBrainsMono-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains/JetBrainsMono-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   02. DESIGN TOKENS — light
   ========================================================================== */

:root,
[data-theme="light"] {
    color-scheme: light;

    /* Brand */
    --sp-primary: #E11D48;
    --sp-primary-hover: #C81A40;
    --sp-primary-active: #B0163A;
    --sp-primary-soft: #FFF1F2;
    --sp-primary-softer: #FFF7F8;
    --sp-primary-ring: rgba(225, 29, 72, .22);
    --sp-on-primary: #FFFFFF;

    /* Neutral surfaces */
    --sp-bg: #F7F7F9;
    --sp-bg-inset: #F1F1F4;
    --sp-surface: #FFFFFF;
    --sp-surface-2: #FBFBFC;
    --sp-surface-3: #F4F4F6;
    --sp-overlay: rgba(24, 24, 27, .5);

    /* Text */
    --sp-text: #18181B;
    --sp-text-2: #52525B;
    --sp-text-3: #8E8E96;
    --sp-text-invert: #FFFFFF;

    /* Borders */
    --sp-border: #E6E6EA;
    --sp-border-strong: #D6D6DC;
    --sp-border-faint: #EFEFF2;

    /* Semantic */
    --sp-success: #0A8A5F;
    --sp-success-soft: #E8F8F1;
    --sp-warning: #B45309;
    --sp-warning-soft: #FEF5E7;
    --sp-danger: #DC2626;
    --sp-danger-soft: #FEEFEF;
    --sp-info: #0369A1;
    --sp-info-soft: #EBF6FD;

    /* Depth */
    --sp-shadow-xs: 0 1px 2px rgba(24, 24, 27, .05);
    --sp-shadow-sm: 0 1px 2px rgba(24, 24, 27, .05), 0 2px 6px rgba(24, 24, 27, .05);
    --sp-shadow-md: 0 2px 4px rgba(24, 24, 27, .05), 0 8px 20px rgba(24, 24, 27, .07);
    --sp-shadow-lg: 0 4px 10px rgba(24, 24, 27, .06), 0 20px 44px rgba(24, 24, 27, .11);
    --sp-shadow-primary: 0 4px 14px rgba(225, 29, 72, .28);

    /* Radii */
    --sp-radius-sm: 8px;
    --sp-radius: 12px;
    --sp-radius-lg: 16px;
    --sp-radius-xl: 20px;
    --sp-radius-full: 999px;

    /* Header */
    --sp-header-bg: rgba(255, 255, 255, .86);
    --sp-header-border: rgba(24, 24, 27, .08);

    /* Motion */
    --sp-ease: cubic-bezier(.25, .7, .3, 1);
    --sp-ease-out: cubic-bezier(.16, 1, .3, 1);
    --sp-t-fast: 140ms;
    --sp-t: 200ms;
    --sp-t-slow: 320ms;
}

/* ==========================================================================
   02b. DESIGN TOKENS — dark  (designed, not inverted)
   ========================================================================== */

[data-theme="dark"] {
    color-scheme: dark;

    --sp-primary: #FB7185;
    --sp-primary-hover: #FDA4AF;
    --sp-primary-active: #F43F5E;
    --sp-primary-soft: rgba(251, 113, 133, .13);
    --sp-primary-softer: rgba(251, 113, 133, .07);
    --sp-primary-ring: rgba(251, 113, 133, .30);
    --sp-on-primary: #1C0B10;

    --sp-bg: #0C0C11;
    --sp-bg-inset: #09090D;
    --sp-surface: #15151C;
    --sp-surface-2: #191921;
    --sp-surface-3: #1F1F29;
    --sp-overlay: rgba(0, 0, 0, .62);

    --sp-text: #F2F2F5;
    --sp-text-2: #A6A6B0;
    --sp-text-3: #6E6E7A;
    --sp-text-invert: #17171C;

    --sp-border: rgba(255, 255, 255, .085);
    --sp-border-strong: rgba(255, 255, 255, .16);
    --sp-border-faint: rgba(255, 255, 255, .05);

    --sp-success: #34D399;
    --sp-success-soft: rgba(52, 211, 153, .12);
    --sp-warning: #FBBF24;
    --sp-warning-soft: rgba(251, 191, 36, .12);
    --sp-danger: #F87171;
    --sp-danger-soft: rgba(248, 113, 113, .12);
    --sp-info: #38BDF8;
    --sp-info-soft: rgba(56, 189, 248, .12);

    --sp-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --sp-shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .35);
    --sp-shadow-md: 0 2px 6px rgba(0, 0, 0, .45), 0 10px 28px rgba(0, 0, 0, .4);
    --sp-shadow-lg: 0 6px 16px rgba(0, 0, 0, .5), 0 24px 60px rgba(0, 0, 0, .45);
    --sp-shadow-primary: 0 4px 18px rgba(251, 113, 133, .22);

    --sp-header-bg: rgba(14, 14, 19, .82);
    --sp-header-border: rgba(255, 255, 255, .08);
}

/* Map legacy Bootstrap-ish palette onto the token system so older markup
   (progress bars, labels, alert variants, util text colors) inherits the
   brand palette in both themes. */
.btn-primary,
.bg-primary,
.badge-primary,
.progress-bar.bg-primary,
.list-group-item.active,
.page-link.active,
.nav-pills .nav-link.active {
    background-color: var(--sp-primary) !important;
    border-color: var(--sp-primary) !important;
    color: var(--sp-on-primary) !important;
}
.bg-success, .badge-success, .progress-bar.bg-success { background-color: var(--sp-success) !important; }
.bg-warning, .badge-warning, .progress-bar.bg-warning { background-color: var(--sp-warning) !important; }
.bg-danger, .badge-danger, .progress-bar.bg-danger { background-color: var(--sp-danger) !important; }
.bg-info, .badge-info, .progress-bar.bg-info { background-color: var(--sp-info) !important; }
.bg-secondary { background-color: var(--sp-surface-3) !important; color: var(--sp-text) !important; }
.bg-color-blue { background-color: var(--sp-primary) !important; color: var(--sp-on-primary) !important; }
.bg-light { background-color: var(--sp-surface-3) !important; }
.bg-white { background-color: var(--sp-surface) !important; }

.text-primary { color: var(--sp-primary) !important; }
.text-success { color: var(--sp-success) !important; }
.text-warning { color: var(--sp-warning) !important; }
.text-danger  { color: var(--sp-danger) !important; }
.text-info    { color: var(--sp-info) !important; }
.text-muted   { color: var(--sp-text-3) !important; }
.text-white   { color: var(--sp-text) !important; }
body.bg-light, .primary-bg-color { background-color: var(--sp-bg) !important; }
.text-body, .text-dark { color: var(--sp-text) !important; }
.text-secondary { color: var(--sp-text-2) !important; }

.border, .border-top, .border-bottom, .border-left, .border-right { border-color: var(--sp-border) !important; }

/* ==========================================================================
   03. BASE & TYPOGRAPHY
   ========================================================================== */

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
html.sp-theme-switching *,
html.sp-theme-switching *::before,
html.sp-theme-switching *::after {
    transition: none !important;
    animation-duration: 0s !important;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    font-size: 14.5px;
    line-height: 1.75;
    font-weight: 400;
    color: var(--sp-text);
    background-color: var(--sp-bg);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color var(--sp-t) var(--sp-ease), color var(--sp-t) var(--sp-ease);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    color: var(--sp-text);
    line-height: 1.45;
    letter-spacing: -0.01em;
}
h1, .h1 { font-size: 1.72rem; font-weight: 800; }
h2, .h2 { font-size: 1.38rem; }
h3, .h3 { font-size: 1.16rem; }
h4, .h4 { font-size: 1.04rem; }
h5, .h5 { font-size: .96rem; }
h6, .h6 { font-size: .88rem; }

p { color: var(--sp-text-2); }
strong, b { font-weight: 600; }
small, .small { font-size: .84rem; }
.lead { font-size: 1.06rem; font-weight: 400; color: var(--sp-text-2); }

a {
    color: var(--sp-primary);
    text-decoration: none;
    transition: color var(--sp-t-fast) var(--sp-ease);
}
a:hover { color: var(--sp-primary-hover); text-decoration: none; }

::selection { background: var(--sp-primary-ring); color: var(--sp-text); }

hr {
    border: 0;
    height: 1px;
    background: var(--sp-border);
    opacity: 1;
    margin: 1.25rem 0;
}

:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--sp-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

code, pre, kbd, samp {
    font-family: 'JetBrains Mono', 'Vazirmatn', monospace;
    font-size: .86em;
    direction: ltr;
    unicode-bidi: embed;
}
code {
    background: var(--sp-surface-3);
    border: 1px solid var(--sp-border-faint);
    border-radius: 6px;
    padding: .1em .45em;
    color: var(--sp-text);
}
pre {
    background: var(--sp-surface-2);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 1rem 1.15rem;
    overflow-x: auto;
    line-height: 1.7;
}

img { max-width: 100%; }
blockquote {
    border-right: 3px solid var(--sp-primary);
    background: var(--sp-primary-softer);
    border-radius: 8px;
    padding: .9rem 1.1rem;
    color: var(--sp-text-2);
}

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--sp-border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--sp-border-strong);
    border-radius: 8px;
    border: 2px solid var(--sp-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--sp-text-3); }

/* ==========================================================================
   04. UTILITIES
   ========================================================================== */

.sp-mono {
    font-family: 'JetBrains Mono', 'Vazirmatn', monospace !important;
    font-size: .88em;
    direction: ltr;
    unicode-bidi: embed;
    letter-spacing: 0;
}
.sp-ltr { direction: ltr; unicode-bidi: embed; }

.sp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--sp-primary);
    background: var(--sp-primary-soft);
    border: 1px solid var(--sp-primary-ring);
    border-radius: var(--sp-radius-full);
    padding: .32rem .85rem;
    line-height: 1.6;
}

.sp-gradient-text {
    background: linear-gradient(120deg, var(--sp-primary), var(--sp-primary-hover));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.sp-divider { height: 1px; background: var(--sp-border); border: 0; margin: 1.1rem 0; }

.sp-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: var(--sp-success);
    box-shadow: 0 0 0 3px var(--sp-success-soft);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   05. LAYOUT SCAFFOLDING
   ========================================================================== */

#main-body { padding: 0 0 2.5rem; }
section#main-body, #main-body { background-color: transparent; }
#main-body > .container { padding-top: 1.75rem; }
.primary-content { min-width: 0; }

.sp-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0 0 1.4rem;
}
.sp-page-head-title h1,
.sp-page-head-title .h1 { margin: 0 0 .3rem; }
.sp-page-head-title p { margin: 0; color: var(--sp-text-3); font-size: .92rem; }
.sp-page-head-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.section-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0 0 1.1rem;
}
.section-title i {
    width: 38px; height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
    font-size: .95rem;
    flex: 0 0 auto;
}
.section-title h2, .section-title .h2 { margin: 0; font-size: 1.14rem; }
.section-title p { margin: .05rem 0 0; font-size: .84rem; color: var(--sp-text-3); }

.table-container { margin-bottom: 1.75rem; }
.header-lined { margin-bottom: 1.5rem; }
.header-lined h1 { margin-bottom: .35rem; }

/* ==========================================================================
   06. BUTTONS
   ========================================================================== */

.btn {
    font-family: 'Vazirmatn', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 10px;
    padding: .5rem 1.15rem;
    border: 1px solid transparent;
    transition: background-color var(--sp-t-fast) var(--sp-ease),
                border-color var(--sp-t-fast) var(--sp-ease),
                color var(--sp-t-fast) var(--sp-ease),
                box-shadow var(--sp-t-fast) var(--sp-ease),
                transform 80ms var(--sp-ease);
    will-change: transform;
    position: relative;
}
.btn i { line-height: 1; }
.btn:active, .btn:focus:active { transform: translateY(0.5px) scale(.99); }
.btn.disabled, .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { font-size: .82rem; padding: .34rem .8rem; border-radius: 8px; }
.btn-lg { font-size: .98rem; padding: .68rem 1.6rem; border-radius: 12px; }
.btn-block { display: flex; width: 100%; justify-content: center; align-items: center; }

.btn-primary {
    background: var(--sp-primary);
    color: var(--sp-on-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover { background: var(--sp-primary-hover); color: var(--sp-on-primary); box-shadow: var(--sp-shadow-primary); }
.btn-primary:focus, .btn-primary.focus { box-shadow: 0 0 0 3px var(--sp-primary-ring); }
.btn-primary:active { background: var(--sp-primary-active) !important; color: var(--sp-on-primary) !important; }
.btn-primary:not(:disabled):not(.disabled):active { background: var(--sp-primary-active); color: var(--sp-on-primary); }

.btn-secondary {
    background: var(--sp-surface-3);
    color: var(--sp-text);
    border-color: var(--sp-border);
}
.btn-secondary:hover { background: var(--sp-surface-2); color: var(--sp-text); border-color: var(--sp-border-strong); }
.btn-secondary:focus { box-shadow: 0 0 0 3px var(--sp-primary-ring); }

.btn-default {
    background: var(--sp-surface);
    color: var(--sp-text);
    border-color: var(--sp-border);
}
.btn-default:hover { background: var(--sp-surface-3); color: var(--sp-text); border-color: var(--sp-border-strong); }

.btn-success { background: var(--sp-success); color: #fff; }
.btn-success:hover { background: var(--sp-success); color: #fff; filter: brightness(1.08); box-shadow: 0 4px 14px rgba(10,138,95,.25); }
.btn-warning { background: var(--sp-warning); color: #fff; }
.btn-warning:hover { background: var(--sp-warning); color: #fff; filter: brightness(1.08); box-shadow: 0 4px 14px rgba(180,83,9,.25); }
.btn-danger, .btn-outline-danger:hover { background: var(--sp-danger); color: #fff; border-color: transparent; }
.btn-danger:hover { filter: brightness(1.08); box-shadow: 0 4px 14px rgba(220,38,38,.28); }
.btn-info { background: var(--sp-info); color: #fff; border-color: transparent; }
.btn-info:hover { background: var(--sp-info); color: #fff; filter: brightness(1.1); }

.btn-light { background: var(--sp-surface-3); color: var(--sp-text); border-color: var(--sp-border); }
.btn-light:hover { background: var(--sp-surface-2); color: var(--sp-text); }
.btn-dark { background: var(--sp-text); color: var(--sp-surface); border-color: transparent; }
.btn-dark:hover { background: var(--sp-text-2); color: var(--sp-surface); }

.btn-outline-primary {
    background: transparent;
    color: var(--sp-primary);
    border-color: var(--sp-primary-ring);
}
.btn-outline-primary:hover {
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
    border-color: var(--sp-primary);
}
.btn-outline-primary:focus { box-shadow: 0 0 0 3px var(--sp-primary-ring); }

.btn-outline-secondary, .btn-outline-default {
    background: var(--sp-surface);
    color: var(--sp-text);
    border-color: var(--sp-border-strong);
}
.btn-outline-secondary:hover, .btn-outline-default:hover {
    background: var(--sp-surface-3);
    color: var(--sp-text);
    border-color: var(--sp-text-3);
}
.btn-outline-success { color: var(--sp-success); border-color: var(--sp-success); background: transparent; }
.btn-outline-success:hover { background: var(--sp-success-soft); color: var(--sp-success); }
.btn-outline-danger { color: var(--sp-danger); border-color: var(--sp-danger); background: transparent; }
.btn-outline-danger:not(:hover) { background: transparent; color: var(--sp-danger); }
.btn-outline-danger:hover { background: var(--sp-danger-soft); color: var(--sp-danger); border-color: var(--sp-danger); }
.btn-outline-warning { color: var(--sp-warning); border-color: var(--sp-warning); background: transparent; }
.btn-outline-warning:hover { background: var(--sp-warning-soft); color: var(--sp-warning); }

.btn-rounded { border-radius: var(--sp-radius-full); }

/* Buttons inside a disabled/processing state used by WHMCS ajax forms */
.btn.loading, button.loading {
    color: transparent !important;
    pointer-events: none;
}
.btn.loading::after, button.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.05em;
    height: 1.05em;
    border: 2px solid currentColor;
    border-right-color: var(--sp-on-primary);
    border-radius: 50%;
    opacity: .9;
    animation: sp-spin .7s linear infinite;
    color: var(--sp-text-2);
}
.btn-primary.loading::after { color: var(--sp-on-primary); }
@keyframes sp-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   07. FORMS
   ========================================================================== */

label { color: var(--sp-text-2); font-weight: 600; font-size: .86rem; margin-bottom: .4rem; }

.form-control,
.custom-select {
    font-family: 'Vazirmatn', sans-serif;
    font-size: .92rem;
    color: var(--sp-text);
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    padding: .52rem .9rem;
    min-height: 42px;
    line-height: 1.6;
    box-shadow: var(--sp-shadow-xs);
    transition: border-color var(--sp-t-fast) var(--sp-ease),
                box-shadow var(--sp-t-fast) var(--sp-ease),
                background-color var(--sp-t-fast) var(--sp-ease);
    appearance: none;
    -webkit-appearance: none;
}
select.form-control, .custom-select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238e8e96' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left .9rem center;
    padding-left: 2.2rem;
}
.form-control:hover { border-color: var(--sp-border-strong); }
.form-control:focus, .custom-select:focus {
    background-color: var(--sp-surface);
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3.5px var(--sp-primary-ring);
    color: var(--sp-text);
    outline: none;
}
.form-control::placeholder { color: var(--sp-text-3); opacity: 1; }
.form-control:disabled, .form-control[readonly] {
    background-color: var(--sp-bg-inset);
    opacity: .85;
}
.form-control.is-invalid, .form-control.is-valid { border-color: var(--sp-danger); }
.form-control.is-valid { border-color: var(--sp-success); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3.5px rgba(220,38,38,.18); }
.form-control.is-valid:focus { box-shadow: 0 0 0 3.5px rgba(10,138,95,.18); }
.invalid-feedback { color: var(--sp-danger); font-size: .8rem; }
.valid-feedback { color: var(--sp-success); font-size: .8rem; }

textarea.form-control { min-height: 120px; resize: vertical; line-height: 1.8; }
.form-control-lg { min-height: 50px; font-size: 1rem; border-radius: 12px; }
.form-control-sm { min-height: 34px; font-size: .84rem; border-radius: 8px; padding: .3rem .7rem; }

.input-group-text {
    background: var(--sp-surface-3);
    border: 1px solid var(--sp-border);
    color: var(--sp-text-3);
    font-size: .86rem;
    border-radius: 10px;
}
.input-group .form-control { border-radius: 10px; }
.input-group-prepend .input-group-text { border-left: 0; border-radius: 0 10px 10px 0; }
.input-group-prepend .btn { border-radius: 0 10px 10px 0; }
.input-group-append .input-group-text { border-right: 0; border-radius: 10px 0 0 10px; }
.input-group-append .btn { border-radius: 10px 0 0 10px; }
.input-group-prepend:not(:first-child) .input-group-text,
.input-group-append:not(:last-child) .input-group-text { border-radius: 0; }
.input-group > .form-control:not(:first-child) { border-radius: 0 10px 10px 0; }
.input-group > .form-control:not(:last-child) { border-radius: 10px 0 0 10px; }
.input-group .btn-reveal-pw { color: var(--sp-text-3); background: var(--sp-surface-3); }
.input-group .btn-reveal-pw:hover { color: var(--sp-text); }

.custom-control { min-height: 1.6rem; padding-right: 1.6rem; padding-left: 0; }
.custom-control-label { font-weight: 500; color: var(--sp-text-2); }
.custom-control-label::before,
.custom-control-label::after { right: -1.6rem; left: auto; }
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--sp-primary);
    border-color: var(--sp-primary);
}
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 3.5px var(--sp-primary-ring); }
.custom-checkbox .custom-control-label::before { border-radius: 5px; }
.custom-switch { padding-right: 2.4rem; }
.custom-switch .custom-control-label::before {
    width: 1.85rem;
    height: 1.05rem;
    border-radius: 999px;
    right: -2.4rem;
    transition: background-color var(--sp-t) var(--sp-ease);
}
.custom-switch .custom-control-label::after {
    width: .85rem;
    height: .85rem;
    top: .1rem;
    right: -2.29rem;
    transition: transform var(--sp-t) var(--sp-ease);
}
.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(-.78rem);
}

input[type=checkbox], input[type=radio] { accent-color: var(--sp-primary); }
input[type=checkbox].domids { width: 16px; height: 16px; cursor: pointer; }

.help-block, .form-text { color: var(--sp-text-3); font-size: .8rem; }

/* WHMCS generic "field" wrapper */
.field { margin-bottom: 1.1rem; }
.field > label { display: block; }

/* Password strength meter */
#pwstrengthbox, .pwstrength-viewport { font-size: .82rem; }
.progress.pwstrength, #pwstrength-progress { height: 6px; border-radius: 99px; background: var(--sp-bg-inset); overflow: hidden; }
.progress-bar { transition: width var(--sp-t-slow) var(--sp-ease-out); }

/* Custom file input */
.custom-file-input { height: 42px; }
.custom-file-label {
    height: 42px;
    line-height: 2.6;
    background: var(--sp-surface);
    border: 1px dashed var(--sp-border-strong);
    border-radius: 10px;
    color: var(--sp-text-3);
}
.custom-file-label::after {
    height: 40px;
    line-height: 2.6;
    background: var(--sp-surface-3);
    border: 0;
    border-right: 1px solid var(--sp-border);
    border-radius: 0 9px 9px 0;
    color: var(--sp-text-2);
    font-family: 'Vazirmatn', sans-serif;
}

/* reCaptcha / captcha block */
.captcha-placeholder img { border-radius: 8px; }

/* ==========================================================================
   08. CARDS & SURFACES
   ========================================================================== */

.card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    box-shadow: var(--sp-shadow-xs);
    transition: background-color var(--sp-t) var(--sp-ease),
                border-color var(--sp-t) var(--sp-ease),
                box-shadow var(--sp-t) var(--sp-ease);
}
.card:hover { box-shadow: var(--sp-shadow-sm); }
.card > .card-header {
    background: transparent;
    border-bottom: 1px solid var(--sp-border);
    padding: 1rem 1.25rem;
}
.card .card-body { padding: 1.25rem; }
.card-title { color: var(--sp-text); font-weight: 700; }
.card-footer { background: transparent; border-top: 1px solid var(--sp-border); color: var(--sp-text-3); }

/* Sidebar navigation cards */
.card-sidebar {
    border-radius: var(--sp-radius-lg);
    overflow: hidden;
}
.card-sidebar > .card-header {
    border-bottom: 1px solid var(--sp-border);
    padding: .95rem 1.15rem;
    background: var(--sp-surface-2);
}
.card-sidebar .card-title { font-size: .95rem; margin: 0; }
.card-sidebar .card-minimise { color: var(--sp-text-3); font-size: .8rem; transition: transform var(--sp-t) var(--sp-ease); cursor: pointer; }
.card-sidebar .collapsed .card-minimise { transform: rotate(180deg); }
.card-sidebar .list-group-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--sp-border-faint);
    color: var(--sp-text-2);
    font-weight: 500;
    font-size: .89rem;
    padding: .68rem 1.15rem;
    display: flex;
    align-items: center;
    transition: background-color var(--sp-t-fast) var(--sp-ease), color var(--sp-t-fast) var(--sp-ease);
}
.card-sidebar .list-group-item:last-child { border-bottom: 0; }
.card-sidebar .list-group-item i { width: 1.35rem; text-align: center; color: var(--sp-text-3); transition: color var(--sp-t-fast) var(--sp-ease); }
.card-sidebar .list-group-item:hover { background: var(--sp-surface-3); color: var(--sp-text); }
.card-sidebar .list-group-item:hover i { color: var(--sp-primary); }
.card-sidebar .list-group-item.active {
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--sp-primary);
}
.card-sidebar .list-group-item.active i { color: var(--sp-primary); }
.card-sidebar .list-group-item.disabled { opacity: .5; pointer-events: none; }
.card-sidebar .badge { background: var(--sp-primary); color: var(--sp-on-primary); border-radius: 99px; font-size: .72rem; padding: .18rem .55rem; }
.sidebar-menu-item-wrapper { display: flex; align-items: center; gap: .6rem; width: 100%; }
.sidebar-menu-item-icon-wrapper { display: flex; }
.sidebar-menu-item-badge { margin-right: auto; }

/* Panels (generic WHMCS includes/panel.tpl) */
.panel, .panel-default { background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius); }
.panel-heading { background: var(--sp-surface-2); border-bottom: 1px solid var(--sp-border); color: var(--sp-text); }

/* Generic list rows (sp-list-item) */
.sp-list-item {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .8rem .95rem;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    background: var(--sp-surface);
    transition: border-color var(--sp-t-fast) var(--sp-ease),
                box-shadow var(--sp-t-fast) var(--sp-ease),
                transform var(--sp-t-fast) var(--sp-ease);
}
.sp-list-item:hover {
    border-color: var(--sp-primary-ring);
    box-shadow: var(--sp-shadow-sm);
    transform: translateY(-1px);
}
.sp-list-item .icon {
    width: 40px; height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
    font-size: .95rem;
}
.sp-list-item .body h4 { font-size: .92rem; margin: 0 0 .1rem; }
.sp-list-item .body p { margin: 0; font-size: .8rem; color: var(--sp-text-3); line-height: 1.55; }

/* Apadana base downgrades Font Awesome to weight 300 (regular subset),
   which breaks most solid glyphs — lock the correct weights. */
.fa, .fas { font-weight: 900 !important; }
.far { font-weight: 400 !important; }
.fab { font-weight: 400 !important; }

/* Safety: absolutely-positioned closed UI must never create horizontal scroll */
html, body { overflow-x: clip; }

/* ==========================================================================
   09. HEADER — top bar, navigation, dropdowns, account menu
   ========================================================================== */

.sp-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: var(--sp-header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--sp-header-border);
    transition: background-color var(--sp-t) var(--sp-ease), box-shadow var(--sp-t) var(--sp-ease), border-color var(--sp-t) var(--sp-ease);
}
.sp-header.is-scrolled { box-shadow: var(--sp-shadow-sm); }

.sp-header-inner {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: 64px;
    position: relative;
    flex-wrap: nowrap;
}

/* Brand */
.sp-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-weight: 800;
    font-size: 1.06rem;
    color: var(--sp-text);
    white-space: nowrap;
    letter-spacing: -.01em;
}
.sp-brand:hover { color: var(--sp-text); }
.sp-brand img.logo-img { max-height: 34px; width: auto; display: block; }
.sp-brand-mark {
    width: 34px; height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--sp-on-primary);
    background: linear-gradient(140deg, var(--sp-primary), var(--sp-primary-hover));
    box-shadow: var(--sp-shadow-primary), inset 0 1px 0 rgba(255,255,255,.25);
    font-size: .9rem;
    transition: transform var(--sp-t) var(--sp-ease-out);
}
.sp-brand:hover .sp-brand-mark { transform: scale(1.06) rotate(-4deg); }
.sp-brand-sub {
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .34em;
    color: var(--sp-text-3);
    margin-right: .1rem;
    vertical-align: middle;
}

/* Header search — shown only when the viewport comfortably fits nav + search */
.sp-header-search {
    position: relative;
    flex: 0 1 300px;
    margin-inline-start: auto;
    display: none;
}
@media (min-width: 1680px) {
    .sp-header-search { display: block; }
}
.sp-header-search input {
    width: 100%;
    height: 38px;
    border-radius: var(--sp-radius-full);
    border: 1px solid var(--sp-border);
    background: var(--sp-surface-3);
    color: var(--sp-text);
    padding: 0 1rem 0 2.5rem;
    font-size: .86rem;
    font-family: 'Vazirmatn', sans-serif;
    transition: border-color var(--sp-t-fast) var(--sp-ease), background-color var(--sp-t-fast) var(--sp-ease), box-shadow var(--sp-t-fast) var(--sp-ease);
}
.sp-header-search input::placeholder { color: var(--sp-text-3); }
.sp-header-search input:focus {
    background: var(--sp-surface);
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3.5px var(--sp-primary-ring);
    outline: none;
}
.sp-header-search i {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sp-text-3);
    font-size: .82rem;
    pointer-events: none;
}

/* Action icons */
.sp-header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-inline-start: auto;
}
.sp-header-search + .sp-header-actions { margin-inline-start: 0; }

.sp-iconbtn {
    position: relative;
    width: 38px; height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--sp-text-2);
    background: transparent;
    border: 1px solid transparent;
    font-size: .98rem;
    cursor: pointer;
    transition: background-color var(--sp-t-fast) var(--sp-ease),
                color var(--sp-t-fast) var(--sp-ease),
                border-color var(--sp-t-fast) var(--sp-ease),
                transform var(--sp-t-fast) var(--sp-ease);
}
.sp-iconbtn:hover {
    background: var(--sp-surface-3);
    color: var(--sp-text);
    border-color: var(--sp-border);
}
.sp-iconbtn:active { transform: scale(.94); }
.sp-iconbtn .client-top-access-item-count {
    position: absolute;
    top: 2px;
    left: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .66rem;
    font-weight: 700;
    border-radius: 99px;
    background: var(--sp-primary);
    color: var(--sp-on-primary);
    box-shadow: 0 0 0 2px var(--sp-surface);
}
.sp-iconbtn .client-top-access-item-count .d-sm-none { line-height: 1; }

/* Theme toggle (segmented control) */
.sp-theme-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--sp-surface-3);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-full);
    padding: 3px;
    gap: 2px;
}
.sp-theme-toggle button {
    width: 30px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 99px;
    background: transparent;
    color: var(--sp-text-3);
    font-size: .8rem;
    cursor: pointer;
    transition: background-color var(--sp-t-fast) var(--sp-ease),
                color var(--sp-t-fast) var(--sp-ease),
                box-shadow var(--sp-t-fast) var(--sp-ease);
}
.sp-theme-toggle button:hover { color: var(--sp-text); }
.sp-theme-toggle button.active {
    background: var(--sp-surface);
    color: var(--sp-primary);
    box-shadow: var(--sp-shadow-xs);
}

/* ------------------------------------------------------------------
   Main navigation
   ------------------------------------------------------------------ */
.sp-mainnav { display: flex; align-items: center; min-width: 0; flex: 0 1 auto; }
.sp-navlinks {
    display: flex;
    align-items: center;
    gap: .1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}
.sp-navlinks > .sp-nav-item { position: relative; flex: 0 0 auto; }

.sp-nav-cta { display: none; }

.sp-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .72rem;
    border-radius: 9px;
    color: var(--sp-text-2);
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--sp-t-fast) var(--sp-ease),
                background-color var(--sp-t-fast) var(--sp-ease);
    user-select: none;
}
.sp-nav-link .lbl { white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; }
.sp-nav-link i:first-child { font-size: .82rem; color: var(--sp-text-3); transition: color var(--sp-t-fast) var(--sp-ease); }
.sp-nav-link:hover { color: var(--sp-text); background: var(--sp-surface-3); }
.sp-nav-link:hover i:first-child { color: var(--sp-primary); }
.sp-nav-item.active > .sp-nav-link { color: var(--sp-primary); background: var(--sp-primary-soft); }
.sp-nav-item.active > .sp-nav-link i:first-child { color: var(--sp-primary); }

.sp-caret {
    font-size: .6rem;
    margin-inline-start: .1rem;
    color: var(--sp-text-3);
    transition: transform var(--sp-t) var(--sp-ease);
}
.sp-nav-item.menu-open > .sp-nav-link .sp-caret { transform: rotate(180deg); }
.sp-nav-item.menu-open > .sp-nav-link { color: var(--sp-text); background: var(--sp-surface-3); }

/* ------------------------------------------------------------------
   Dropdown panels (Sepanta controller: [data-sp-menu])
   ------------------------------------------------------------------ */
.sp-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 14px;
    box-shadow: var(--sp-shadow-lg);
    padding: .45rem;
    z-index: 1070;
    display: none;
    transform-origin: top right;
}
.sp-nav-item.menu-open > .sp-menu,
.sp-account.menu-open > .sp-menu {
    display: block;
    animation: sp-menu-in .18s var(--sp-ease-out);
}
@keyframes sp-menu-in {
    from { opacity: 0; transform: translateY(6px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.sp-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 20px;
    width: 12px; height: 12px;
    background: var(--sp-surface);
    border-top: 1px solid var(--sp-border);
    border-right: 1px solid var(--sp-border);
    transform: rotate(45deg);
    border-top-right-radius: 3px;
}
.sp-nav-item.menu-left > .sp-menu, .sp-account.menu-left > .sp-menu { right: auto; left: 0; transform-origin: top left; }
.sp-nav-item.menu-left .sp-menu::before, .sp-account.menu-left .sp-menu::before { right: auto; left: 20px; }

/* The account button sits at the far end of the header in RTL — its menu
   opens toward the inside of the page. */
.sp-account > .sp-menu { right: auto; left: 0; transform-origin: top left; }
.sp-account > .sp-menu::before { right: auto; left: 20px; }

.sp-menu-header {
    padding: .55rem .75rem .5rem;
    border-bottom: 1px solid var(--sp-border-faint);
    margin-bottom: .35rem;
}
.sp-menu-header .sp-menu-title { font-size: .86rem; font-weight: 700; color: var(--sp-text); margin: 0; }
.sp-menu-header .sp-menu-sub { font-size: .76rem; color: var(--sp-text-3); margin: .1rem 0 0; direction: ltr; text-align: right; }
.sp-menu-header .sp-menu-sub.fa { direction: rtl; text-align: right; }

.sp-menu-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .75rem;
    border-radius: 9px;
    color: var(--sp-text-2);
    font-size: .87rem;
    font-weight: 500;
    transition: background-color var(--sp-t-fast) var(--sp-ease), color var(--sp-t-fast) var(--sp-ease);
    cursor: pointer;
    width: 100%;
    text-align: right;
    background: transparent;
    border: 0;
    font-family: 'Vazirmatn', sans-serif;
}
.sp-menu-item i {
    width: 1.4rem;
    text-align: center;
    font-size: .84rem;
    color: var(--sp-text-3);
    transition: color var(--sp-t-fast) var(--sp-ease);
}
.sp-menu-item:hover { background: var(--sp-surface-3); color: var(--sp-text); }
.sp-menu-item:hover i { color: var(--sp-primary); }
.sp-menu-item.danger { color: var(--sp-danger); }
.sp-menu-item.danger i { color: var(--sp-danger); }
.sp-menu-item.danger:hover { background: var(--sp-danger-soft); color: var(--sp-danger); }
.sp-menu-divider { height: 1px; background: var(--sp-border-faint); margin: .4rem .25rem; }
.sp-menu-footer { padding: .5rem .75rem .3rem; border-top: 1px solid var(--sp-border-faint); margin-top: .35rem; }

/* ------------------------------------------------------------------
   Account (user) menu
   ------------------------------------------------------------------ */
.sp-account { position: relative; }
.sp-account-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .28rem .55rem .28rem .8rem;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-full);
    background: var(--sp-surface);
    color: var(--sp-text);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: border-color var(--sp-t-fast) var(--sp-ease),
                box-shadow var(--sp-t-fast) var(--sp-ease),
                background-color var(--sp-t-fast) var(--sp-ease);
}
.sp-account-btn:hover { border-color: var(--sp-border-strong); box-shadow: var(--sp-shadow-xs); }
.sp-account-btn .sp-caret { margin-inline-start: .15rem; }
.sp-account-btn .sp-account-name {
    font-size: .85rem;
    font-weight: 600;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-account-avatar {
    width: 32px; height: 32px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, var(--sp-primary), var(--sp-primary-hover));
    color: var(--sp-on-primary);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
    overflow: hidden;
    user-select: none;
}
.sp-account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sp-account-avatar.sp-avatar-default i { font-size: .85rem; }

.sp-account-menu { min-width: 260px; }
.sp-account-menu .sp-menu-item { padding: .5rem .7rem; }
.sp-account-credits {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    background: var(--sp-primary-softer);
    border: 1px solid var(--sp-primary-ring);
    border-radius: 10px;
    padding: .5rem .7rem;
    margin: 0 .15rem .4rem;
}
.sp-account-credits .lbl { font-size: .78rem; color: var(--sp-text-2); font-weight: 600; }
.sp-account-credits .val { font-size: .84rem; font-weight: 700; color: var(--sp-primary); font-family: 'JetBrains Mono', monospace; }

/* ------------------------------------------------------------------
   Mobile navigation
   ------------------------------------------------------------------ */
.sp-navbar-toggler {
    display: none;
    width: 38px; height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    background: var(--sp-surface);
    color: var(--sp-text);
    font-size: .95rem;
    cursor: pointer;
    transition: background-color var(--sp-t-fast) var(--sp-ease);
}
.sp-navbar-toggler:hover { background: var(--sp-surface-3); }

@media (max-width: 1199.98px) {
    .sp-navbar-toggler { display: inline-flex; }
    .sp-header-inner { flex-wrap: wrap; min-height: 60px; padding-top: .4rem; padding-bottom: .4rem; }
    .sp-mainnav {
        order: 5;
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--sp-t-slow) var(--sp-ease-out);
    }
    .sp-mainnav.menu-open { max-height: min(72vh, 620px); overflow-y: auto; }
    .sp-nav-cta { display: block; }
    .sp-navlinks {
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        padding: .6rem 0 1rem;
        width: 100%;
    }
    .sp-nav-link {
        width: 100%;
        justify-content: space-between;
        padding: .68rem .85rem;
        border-radius: 11px;
        font-size: .93rem;
    }
    .sp-nav-link > .row-content, .sp-nav-link .lbl { display: inline-flex; align-items: center; gap: .55rem; }
    .sp-menu {
        position: static;
        min-width: 0;
        box-shadow: none;
        border: 0;
        border-right: 2px solid var(--sp-border);
        border-radius: 0;
        padding: .1rem .4rem .3rem .8rem;
        margin: .15rem .9rem .4rem 0;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        display: none;
        background: transparent;
        transition: none;
    }
    .sp-menu::before { display: none; }
    .sp-nav-item.menu-open > .sp-menu { display: block; }
    .sp-menu-item { padding: .55rem .6rem; font-size: .88rem; }
    .sp-header-actions { margin-inline-start: auto; }
}

@media (max-width: 575.98px) {
    .sp-account-btn .sp-account-name { display: none; }
    .sp-account-btn { padding: .26rem .4rem .26rem .45rem; gap: .35rem; }
    .sp-theme-toggle button:nth-child(3) { display: none; }
    .sp-brand-sub { display: none; }
}

/* ==========================================================================
   10. BREADCRUMB
   ========================================================================== */

.master-breadcrumb { padding: .55rem 0; border-bottom: 1px solid var(--sp-border-faint); background: var(--sp-surface); }
.master-breadcrumb .breadcrumb {
    background: transparent;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .15rem;
    font-size: .8rem;
}
.master-breadcrumb .breadcrumb-item { display: flex; align-items: center; color: var(--sp-text-3); }
.master-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "\f104";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--sp-text-3);
    opacity: .6;
    padding: 0 .55rem;
    font-size: .7rem;
}
.master-breadcrumb .breadcrumb-item a { color: var(--sp-text-2); font-weight: 500; }
.master-breadcrumb .breadcrumb-item a:hover { color: var(--sp-primary); }
.master-breadcrumb .breadcrumb-item.active, .master-breadcrumb .breadcrumb-item.active a { color: var(--sp-text); font-weight: 600; }
.master-breadcrumb .navlog { margin-inline-start: auto; }
.master-breadcrumb .navlog select, .master-breadcrumb .navlog .dropdown { min-width: 130px; }

/* ==========================================================================
   HERO — SepantaPixel landing (homepage)
   ========================================================================== */

.sp-hero {
    position: relative;
    padding: 5.5rem 0 4.5rem;
    overflow: hidden;
    background:
        radial-gradient(720px 340px at 85% -8%, var(--sp-primary-soft), transparent 62%),
        radial-gradient(640px 320px at 8% 8%, var(--sp-info-soft), transparent 60%);
}
.sp-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--sp-border-faint) 1px, transparent 1px),
        linear-gradient(90deg, var(--sp-border-faint) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 75% 68% at 50% 0%, #000 45%, transparent 78%);
    mask-image: radial-gradient(ellipse 75% 68% at 50% 0%, #000 45%, transparent 78%);
    pointer-events: none;
}
.sp-hero-inner { position: relative; }
.sp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 99px;
    padding: .4rem 1rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--sp-text-2);
    box-shadow: var(--sp-shadow-xs);
    margin-bottom: 1.4rem;
}
.sp-hero-badge .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sp-success);
    box-shadow: 0 0 0 3px var(--sp-success-soft);
    animation: sp-pulse 2.4s ease-in-out infinite;
}
@keyframes sp-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--sp-success-soft); }
    50% { box-shadow: 0 0 0 6px transparent; }
}
.sp-hero h1 {
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.02em;
    margin-bottom: 1.1rem;
}
.sp-hero h1 em {
    font-style: normal;
    color: var(--sp-primary);
    position: relative;
    white-space: nowrap;
}
.sp-hero p.lead { max-width: 34rem; }
.sp-hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.7rem 0 2rem; }
.sp-hero-stats { display: flex; gap: 2.2rem; flex-wrap: wrap; }
.sp-hero-stats .stat { display: flex; flex-direction: column; }
.sp-hero-stats .stat b {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--sp-text);
    font-family: 'JetBrains Mono', monospace;
    direction: ltr;
}
.sp-hero-stats .stat span { font-size: .8rem; color: var(--sp-text-3); }

/* Hero terminal card */
.sp-hero-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-xl);
    box-shadow: var(--sp-shadow-lg);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
    transition: transform .5s var(--sp-ease-out), box-shadow .5s var(--sp-ease-out);
}
.sp-hero-card:hover { transform: perspective(1200px) rotateY(0) rotateX(0); box-shadow: var(--sp-shadow-lg); }
.sp-hero-terminal {
    display: flex;
    align-items: center;
    gap: .42rem;
    padding: .8rem 1.1rem;
    border-bottom: 1px solid var(--sp-border);
    background: var(--sp-surface-2);
}
.sp-hero-terminal i {
    width: 11px; height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.sp-hero-terminal i:nth-child(1) { background: #FF5F57; }
.sp-hero-terminal i:nth-child(2) { background: #FEBC2E; }
.sp-hero-terminal i:nth-child(3) { background: #28C840; }
.sp-hero-terminal span {
    margin-inline-start: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: var(--sp-text-3);
    direction: ltr;
}
.sp-hero-body {
    padding: 1.25rem 1.35rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: .84rem;
    line-height: 2.15;
    direction: ltr;
    text-align: left;
    color: var(--sp-text-2);
    min-height: 250px;
}
.sp-hero-body .c { color: var(--sp-text-3); font-style: italic; }
.sp-hero-body .p { color: var(--sp-primary); font-weight: 700; }
.sp-hero-body .k { color: var(--sp-success); font-weight: 600; }
.sp-hero-body .u { color: var(--sp-info); }
.sp-hero-body .cursor {
    display: inline-block;
    width: 8px; height: 1em;
    background: var(--sp-primary);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: sp-blink 1.1s steps(1) infinite;
}
@keyframes sp-blink { 50% { opacity: 0; } }

/* Trust bar under hero */
.sp-trustbar { border-block: 1px solid var(--sp-border); background: var(--sp-surface); }
.sp-trustbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.05rem 0;
}
.sp-trustbar-item {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--sp-text-2);
    font-size: .85rem;
    font-weight: 600;
}
.sp-trustbar-item i { color: var(--sp-primary); }

/* ==========================================================================
   DASHBOARD — client area home
   ========================================================================== */

.sp-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: .35rem 0 1.5rem;
}
.sp-welcome h1 { margin: 0 0 .25rem; font-size: 1.5rem; }
.sp-welcome p { margin: 0; color: var(--sp-text-3); font-size: .9rem; }
.sp-welcome-actions { display: flex; gap: .55rem; flex-wrap: wrap; }

/* KPI stat cards */
.sp-stat {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    position: relative;
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 1.15rem 1.25rem 1.05rem;
    height: 100%;
    overflow: hidden;
    transition: border-color var(--sp-t) var(--sp-ease),
                box-shadow var(--sp-t) var(--sp-ease),
                transform var(--sp-t) var(--sp-ease);
}
.sp-stat::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--sp-primary), transparent 82%);
    opacity: 0;
    transition: opacity var(--sp-t) var(--sp-ease);
}
.sp-stat:hover { transform: translateY(-2px); border-color: var(--sp-primary-ring); box-shadow: var(--sp-shadow-md); }
.sp-stat:hover::after { opacity: 1; }
.sp-stat-icon {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
    font-size: .95rem;
    margin-bottom: .7rem;
    transition: transform var(--sp-t) var(--sp-ease-out);
}
.sp-stat:hover .sp-stat-icon { transform: scale(1.07) rotate(-3deg); }
.sp-stat-icon.is-info { background: var(--sp-info-soft); color: var(--sp-info); }
.sp-stat-icon.is-success { background: var(--sp-success-soft); color: var(--sp-success); }
.sp-stat-icon.is-warning { background: var(--sp-warning-soft); color: var(--sp-warning); }
.sp-stat-label { font-size: .82rem; font-weight: 600; color: var(--sp-text-3); }
.sp-stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--sp-text);
    line-height: 1.3;
    font-family: 'JetBrains Mono', 'Vazirmatn', monospace;
}
.sp-stat-sub { font-size: .76rem; color: var(--sp-text-3); }

/* Legacy Apadana widget-stat (still present in some pages) — reskin */
.widget-stat { background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg); height: 100%; }
.widget-stat .card-body { padding: 1.15rem 1.25rem; }
.widget-stat .media-body p { font-size: .82rem; font-weight: 600; }
.widget-stat h4 { font-size: 1.4rem; font-weight: 800; font-family: 'JetBrains Mono', 'Vazirmatn', monospace; }
.widget-stat .bgl-success, .widget-stat .bgl-primary, .widget-stat .bgl-warning, .widget-stat .bgl-danger {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.widget-stat .bgl-success { background: var(--sp-success-soft); }
.widget-stat .bgl-primary { background: var(--sp-primary-soft); }
.widget-stat .bgl-warning { background: var(--sp-warning-soft); }
.widget-stat .bgl-danger { background: var(--sp-danger-soft); }
.widget-stat .progress { height: 5px; border-radius: 99px; background: var(--sp-bg-inset); }

.client-home-cards .card { height: 100%; }

/* Announcements mini list (newser) */
ul.newser { list-style: none; margin: 0; padding: 0; }
.newser-item { border-bottom: 1px dashed var(--sp-border); }
.newser-item:last-child { border-bottom: 0; }
.newser-item a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .72rem .2rem;
    color: var(--sp-text-2);
    font-size: .88rem;
    font-weight: 500;
}
.newser-item a:hover { color: var(--sp-primary); }
.newser-item .title { display: inline-flex; align-items: center; gap: .6rem; }
.newser-item .title-icon {
    width: 26px; height: 26px;
    border-radius: 8px;
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .62rem;
    flex: 0 0 auto;
    transition: transform var(--sp-t-fast) var(--sp-ease);
}
.newser-item a:hover .title-icon { transform: translateX(-3px); }
.newser-item .title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   11. TABLES & DATATABLES
   ========================================================================== */

.table, .dataTable {
    color: var(--sp-text);
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    width: 100%;
}
.table th, .table td, .dataTable th, .dataTable td {
    border: 0;
    border-bottom: 1px solid var(--sp-border-faint);
    padding: .85rem 1rem;
    vertical-align: middle;
    background-color: transparent;
    color: var(--sp-text-2);
    font-size: .88rem;
}
table.dataTable thead th, .table.dataTable thead th, .table thead th, .dataTable thead th {
    color: var(--sp-text-3);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--sp-surface-2);
    border-bottom: 1px solid var(--sp-border);
    white-space: nowrap;
    padding: .8rem 1rem;
}
.table thead th:first-child, .dataTable thead th:first-child { border-start-start-radius: 12px; }
.table thead th:last-child, .dataTable thead th:last-child { border-start-end-radius: 12px; }
.table tbody tr, .dataTable tbody tr {
    transition: background-color var(--sp-t-fast) var(--sp-ease);
}
.table tbody tr:last-child td, .dataTable tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td, .dataTable tbody tr:hover td { background: var(--sp-surface-2); }

/* Clickable rows (WHMCS list pages use onclick on <tr>) */
.table-list tbody tr[onclick], .dataTable tbody tr[onclick] { cursor: pointer; }
.table-list tbody tr[onclick]:hover td, .dataTable tbody tr[onclick]:hover td { background: var(--sp-primary-softer); }

.table-responsive { border-radius: 12px; }
.table-striped tbody tr:nth-of-type(odd) td, .table-striped tbody tr:nth-of-type(odd) th { background: var(--sp-surface-2); }
.table-bordered, .table-bordered td, .table-bordered th { border-color: var(--sp-border); }
.table .text-danger { color: var(--sp-danger) !important; }

/* DataTables shell */
.dataTables_wrapper { padding-top: .25rem; }
.dataTables_wrapper .dataTables_filter { margin-bottom: 1rem; }
.dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--sp-text-3); font-weight: 500; font-size: .84rem; }
.dataTables_wrapper .dataTables_filter input {
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--sp-border);
    background: var(--sp-surface);
    color: var(--sp-text);
    padding: 0 .9rem;
    min-width: 220px;
    font-size: .86rem;
    box-shadow: var(--sp-shadow-xs);
    transition: border-color var(--sp-t-fast) var(--sp-ease), box-shadow var(--sp-t-fast) var(--sp-ease);
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--sp-primary); box-shadow: 0 0 0 3.5px var(--sp-primary-ring); outline: none; }
.dataTables_wrapper .dataTables_length select {
    border-radius: 9px;
    border: 1px solid var(--sp-border);
    background: var(--sp-surface);
    color: var(--sp-text);
    padding: .3rem .6rem;
    font-size: .84rem;
}
.dataTables_wrapper .dataTables_info { color: var(--sp-text-3); font-size: .8rem; padding-top: .8rem; }
.dataTables_wrapper .dataTables_paginate { padding-top: .8rem; display: flex; gap: .3rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid var(--sp-border);
    background: var(--sp-surface);
    color: var(--sp-text-2) !important;
    font-size: .84rem;
    padding: 0 .55rem;
    cursor: pointer;
    transition: all var(--sp-t-fast) var(--sp-ease);
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--sp-surface-3);
    border-color: var(--sp-border-strong);
    color: var(--sp-text) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--sp-primary) !important;
    border-color: var(--sp-primary);
    color: var(--sp-on-primary) !important;
    font-weight: 700;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: .4;
    cursor: default;
    pointer-events: none;
}
.dataTables_wrapper table.dataTable thead .sorting::before,
.dataTables_wrapper table.dataTable thead .sorting::after,
.dataTables_wrapper table.dataTable thead .sorting_asc::before,
.dataTables_wrapper table.dataTable thead .sorting_asc::after,
.dataTables_wrapper table.dataTable thead .sorting_desc::before,
.dataTables_wrapper table.dataTable thead .sorting_desc::after {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: .58rem;
    opacity: 1;
    color: var(--sp-text-3);
}
.dataTables_wrapper table.dataTable thead .sorting::before { content: "\f0d8"; bottom: 1.06rem; }
.dataTables_wrapper table.dataTable thead .sorting::after { content: "\f0d7"; bottom: .48rem; }
.dataTables_wrapper table.dataTable thead .sorting::before,
.dataTables_wrapper table.dataTable thead .sorting::after { opacity: .35; }
.dataTables_wrapper table.dataTable thead .sorting_asc::before { content: "\f0d8"; opacity: 1; color: var(--sp-primary); bottom: 1.06rem; }
.dataTables_wrapper table.dataTable thead .sorting_desc::after { content: "\f0d7"; opacity: 1; color: var(--sp-primary); bottom: .48rem; }
.dataTables_wrapper table.dataTable thead .sorting_asc::after,
.dataTables_wrapper table.dataTable thead .sorting_desc::before { content: none; }
.dataTables_wrapper .dataTables_processing {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 12px;
    color: var(--sp-text-2);
    box-shadow: var(--sp-shadow-md);
    padding: .8rem 1.4rem;
    top: 52%;
    font-size: .86rem;
}
.dataTables_wrapper .dataTables_empty {
    padding: 3rem 1rem !important;
    text-align: center;
    color: var(--sp-text-3);
    font-size: .9rem;
}
.dataTables_wrapper .dataTables_empty::before {
    content: "\f49e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    display: block;
    font-size: 1.9rem;
    margin-bottom: .7rem;
    color: var(--sp-border-strong);
}

/* DataTables responsive child rows */
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child::before,
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child::before {
    background: var(--sp-primary);
    border: 0;
    box-shadow: none;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent[role="row"] > td:first-child::before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent[role="row"] > th:first-child::before {
    background: var(--sp-border-strong);
}
table.dataTable > tbody > tr.child ul.dtr-details { color: var(--sp-text-2); }
table.dataTable > tbody > tr.child ul.dtr-details li { border-bottom-color: var(--sp-border-faint); }
table.dataTable > tbody > tr.child span.dtr-title { color: var(--sp-text-3); font-weight: 600; }
table.dataTable > tbody > tr.child span.dtr-data { color: var(--sp-text); }

/* ==========================================================================
   12. STATUS LABELS & BADGES
   ========================================================================== */

.label, .badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: var(--sp-radius-full);
    font-size: .74rem;
    font-weight: 700;
    padding: .28rem .7rem;
    line-height: 1.5;
    white-space: nowrap;
}
.label.status, span.label.status { border: 1px solid transparent; }
.label.status::before, .status-pill::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

/* WHMCS status classes */
.label.status-active,   .label.status-completed, .label.status-paid,
.label.status-delivered { background: var(--sp-success-soft); color: var(--sp-success); border-color: transparent; }
.label.status-pending,  .label.status-pendingtransfer, .label.status-pendingregistration,
.label.status-paymentpending, .label.status-open { background: var(--sp-warning-soft); color: var(--sp-warning); border-color: transparent; }
.label.status-fraud,    .label.status-suspended, .label.status-expiringsoon,
.label.status-expired   { background: var(--sp-warning-soft); color: var(--sp-warning); border-color: transparent; }
.label.status-terminated, .label.status-cancelled, .label.status-cancelled,
.label.status-unpaid,   .label.status-overdue, .label.status-refunded,
.label.status-deleted,  .label.status-closed, .label.status-failed { background: var(--sp-danger-soft); color: var(--sp-danger); border-color: transparent; }
.label.status-draft,    .label.status-answered { background: var(--sp-info-soft); color: var(--sp-info); border-color: transparent; }
.label.status-custom { color: #fff; }
.label.status-custom::before { background: #fff; }
.label.bg-color-blue, .btn.bg-color-blue { border-radius: var(--sp-radius-full); font-size: .74rem; font-weight: 700; padding: .28rem .7rem; }
.label-default { background: var(--sp-surface-3); color: var(--sp-text-2); }
.label-primary { background: var(--sp-primary-soft); color: var(--sp-primary); }
.label-success { background: var(--sp-success-soft); color: var(--sp-success); }
.label-warning { background: var(--sp-warning-soft); color: var(--sp-warning); }
.label-danger  { background: var(--sp-danger-soft); color: var(--sp-danger); }
.label-info    { background: var(--sp-info-soft); color: var(--sp-info); }

/* ==========================================================================
   13. ALERTS
   ========================================================================== */

.alert {
    border-radius: var(--sp-radius);
    border: 1px solid transparent;
    padding: .95rem 1.15rem;
    font-size: .88rem;
    line-height: 1.75;
    color: var(--sp-text);
    position: relative;
    box-shadow: var(--sp-shadow-xs);
}
.alert h2 { font-size: .95rem; margin-bottom: .25rem; }
.alert ul { margin: .35rem 0 0; padding-right: 1.1rem; }
.alert .close { color: var(--sp-text-3); opacity: .7; text-shadow: none; transition: opacity var(--sp-t-fast) var(--sp-ease); }
.alert .close:hover { opacity: 1; }
.alert-info {
    background: var(--sp-info-soft);
    border-color: color-mix(in srgb, var(--sp-info) 22%, transparent);
    color: var(--sp-info);
}
.alert-info .alert-text, .alert-info p { color: inherit; }
.alert-success {
    background: var(--sp-success-soft);
    border-color: color-mix(in srgb, var(--sp-success) 22%, transparent);
    color: var(--sp-success);
}
.alert-warning {
    background: var(--sp-warning-soft);
    border-color: color-mix(in srgb, var(--sp-warning) 24%, transparent);
    color: var(--sp-warning);
}
.alert-danger {
    background: var(--sp-danger-soft);
    border-color: color-mix(in srgb, var(--sp-danger) 22%, transparent);
    color: var(--sp-danger);
}
@supports not (color: color-mix(in srgb, red 10%, blue)) {
    .alert-info { border-color: var(--sp-info); }
    .alert-success { border-color: var(--sp-success); }
    .alert-warning { border-color: var(--sp-warning); }
    .alert-danger { border-color: var(--sp-danger); }
}

/* ==========================================================================
   14. TABS
   ========================================================================== */

.nav-tabs, .custom-tab-1 .nav-tabs {
    border-bottom: 1px solid var(--sp-border);
    gap: .3rem;
    margin-bottom: 1.15rem;
}
.nav-tabs .nav-link, .custom-tab-1 .nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--sp-text-3);
    font-weight: 600;
    font-size: .89rem;
    padding: .6rem .95rem;
    margin-bottom: -1px;
    background: transparent;
    transition: color var(--sp-t-fast) var(--sp-ease), border-color var(--sp-t-fast) var(--sp-ease);
}
.nav-tabs .nav-link i { margin-inline-end: .1rem; }
.nav-tabs .nav-link:hover { color: var(--sp-text); border-bottom-color: var(--sp-border-strong); }
.nav-tabs .nav-link.active, .custom-tab-1 .nav-tabs .nav-link.active {
    color: var(--sp-primary);
    border-bottom-color: var(--sp-primary);
    background: transparent;
}
.nav-tabs .nav-link.disabled { opacity: .5; }
.tab-content > .tab-pane { animation: sp-fade-up .25s var(--sp-ease-out); }
@keyframes sp-fade-up {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Nav pills */
.nav-pills .nav-link { color: var(--sp-text-2); border-radius: 10px; font-weight: 600; font-size: .88rem; padding: .5rem .9rem; }
.nav-pills .nav-link:hover { color: var(--sp-text); background: var(--sp-surface-3); }
.nav-pills .nav-link.active { background: var(--sp-primary); color: var(--sp-on-primary); }

/* ==========================================================================
   15. MODALS & GENERIC DROPDOWNS
   ========================================================================== */

.modal-content {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-xl);
    box-shadow: var(--sp-shadow-lg);
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid var(--sp-border);
    padding: 1.1rem 1.4rem;
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--sp-text); }
.modal-body { padding: 1.4rem; color: var(--sp-text-2); font-size: .92rem; }
.modal-footer {
    border-top: 1px solid var(--sp-border);
    padding: 1rem 1.4rem;
    gap: .5rem;
}
.modal-backdrop.show { opacity: var(--sp-overlay-raw, .5); }
.modal-backdrop { background-color: var(--sp-overlay); }
.modal .close {
    color: var(--sp-text-3);
    text-shadow: none;
    opacity: .8;
    border-radius: 8px;
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--sp-t-fast) var(--sp-ease);
}
.modal .close:hover { opacity: 1; color: var(--sp-text); background: var(--sp-surface-3); }
.modal .close span[aria-hidden="true"] { font-weight: 400; }

/* Notifications modal */
.notifications-but .modal-body ul li a {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .75rem .85rem;
    border-radius: 12px;
    color: var(--sp-text-2);
    transition: background-color var(--sp-t-fast) var(--sp-ease);
}
.notifications-but .modal-body ul li a:hover { background: var(--sp-surface-3); color: var(--sp-text); }
.notifications-but .modal-body ul li .icon {
    width: 36px; height: 36px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
    font-size: .9rem;
}
.notifications-but .modal-body ul li .notification-title { display: block; font-size: .88rem; line-height: 1.6; }
.alert.notifications-but, .notifications-but li.alert-info {
    background: var(--sp-info-soft);
    color: var(--sp-info);
    border-radius: 12px;
    border: 0;
}

/* Bootstrap generic dropdowns (used by DataTables length, WHMCS widgets) */
.dropdown-menu {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 13px;
    box-shadow: var(--sp-shadow-lg);
    padding: .45rem;
    z-index: 1070;
}
.dropdown-menu .dropdown-item, .dropdown-item {
    color: var(--sp-text-2);
    font-size: .87rem;
    font-weight: 500;
    border-radius: 9px;
    padding: .5rem .75rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    transition: background-color var(--sp-t-fast) var(--sp-ease), color var(--sp-t-fast) var(--sp-ease);
}
.dropdown-item:hover, .dropdown-item:focus {
    background: var(--sp-surface-3);
    color: var(--sp-text);
}
.dropdown-item i { color: var(--sp-text-3); width: 1.3rem; text-align: center; }
.dropdown-item.active, .dropdown-item:active { background: var(--sp-primary-soft); color: var(--sp-primary); }
.dropdown-divider { border-top-color: var(--sp-border-faint); }
.dropdown-menu.show { animation: sp-pop .16s var(--sp-ease-out); }
@keyframes sp-pop {
    from { opacity: 0; transform: translateY(4px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-toggle::after {
    border-top-color: currentColor;
    border-width: .32em;
    margin-inline-start: .45em;
    vertical-align: .18em;
}
.btn-group .btn, .btn-group-vertical .btn { border-radius: 9px; }
.btn-group > .btn:not(:first-child) { border-start-start-radius: 0; border-end-start-radius: 0; }
.btn-group > .btn:not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; }

/* ==========================================================================
   16. PAGINATION, PROGRESS, TOOLTIP, MISC WIDGETS
   ========================================================================== */

.pagination { gap: .3rem; }
.page-link {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid var(--sp-border);
    background: var(--sp-surface);
    color: var(--sp-text-2);
    font-size: .86rem;
    font-weight: 600;
    transition: all var(--sp-t-fast) var(--sp-ease);
}
.page-link:hover { background: var(--sp-surface-3); color: var(--sp-text); border-color: var(--sp-border-strong); z-index: 2; }
.page-item.active .page-link { background: var(--sp-primary); border-color: var(--sp-primary); color: var(--sp-on-primary); }
.page-item.disabled .page-link { opacity: .45; background: var(--sp-surface); color: var(--sp-text-3); }

.progress { background: var(--sp-bg-inset); border-radius: 99px; }

.tooltip-inner {
    background: var(--sp-text);
    color: var(--sp-surface);
    border-radius: 9px;
    padding: .42rem .75rem;
    font-size: .78rem;
    font-family: 'Vazirmatn', sans-serif;
    box-shadow: var(--sp-shadow-md);
}
.tooltip.bs-tooltip-top .arrow::before { border-top-color: var(--sp-text); }
.tooltip.bs-tooltip-bottom .arrow::before { border-bottom-color: var(--sp-text); }
.tooltip.bs-tooltip-right .arrow::before { border-right-color: var(--sp-text); }
.tooltip.bs-tooltip-left .arrow::before { border-left-color: var(--sp-text); }

/* Fullpage overlay (WHMCS ajax loader) */
#fullpage-overlay {
    background: var(--sp-overlay);
    z-index: 2000;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
#fullpage-overlay .inner-wrapper {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 1.6rem 2.2rem;
    color: var(--sp-text);
    box-shadow: var(--sp-shadow-lg);
}
#fullpage-overlay .msg { color: var(--sp-text-2); font-size: .9rem; font-weight: 600; }

/* Return-to-admin floating button */
.btn-return-to-admin {
    position: fixed;
    bottom: 1.2rem;
    left: 1.2rem;
    z-index: 1500;
    background: var(--sp-text);
    color: var(--sp-surface);
    border-radius: var(--sp-radius-full);
    padding: .55rem 1.1rem;
    font-size: .82rem;
    font-weight: 600;
    box-shadow: var(--sp-shadow-lg);
}
.btn-return-to-admin:hover { background: var(--sp-primary); color: #fff; }

/* jQuery UI datepicker */
.ui-widget, .ui-widget input, .ui-widget select { font-family: 'Vazirmatn', sans-serif; }
.ui-datepicker, .ui-datepicker-header, .ui-datepicker th, .ui-datepicker td {
    background: var(--sp-surface);
    color: var(--sp-text);
    border-color: var(--sp-border);
}
.ui-datepicker-header { border-bottom: 1px solid var(--sp-border); border-radius: 12px 12px 0 0; }
.ui-datepicker td a { color: var(--sp-text-2); }
.ui-datepicker td a:hover { background: var(--sp-surface-3); color: var(--sp-text); border: 0; }
.ui-datepicker .ui-state-highlight { background: var(--sp-primary-soft); color: var(--sp-primary); border: 0; }
.ui-datepicker .ui-state-active { background: var(--sp-primary); color: var(--sp-on-primary); border: 0; border-radius: 8px; }
.ui-widget-overlay { background: var(--sp-overlay); opacity: 1; }

/* Bootstrap collapse used by some widgets */
.collapse.show, .collapsing { visibility: visible; }

/* Select2 (used in some WHMCS forms) */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    height: 42px;
    color: var(--sp-text);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--sp-text);
    line-height: 40px;
}
.select2-container--default .select2-selection--multiple { height: auto; padding: .3rem .6rem; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--sp-text-3) transparent transparent transparent; }
.select2-dropdown { background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: 12px; box-shadow: var(--sp-shadow-lg); }
.select2-search input { background: var(--sp-surface-2) !important; border: 1px solid var(--sp-border) !important; color: var(--sp-text); }
.select2-container--default .select2-results__option { color: var(--sp-text-2); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--sp-primary-soft); color: var(--sp-primary); }
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--sp-surface-3); color: var(--sp-text); }

/* Slinky/collapsable helpers */
.collapsable-card-body { color: var(--sp-text-2); }
.w-hidden { display: none !important; }

/* Empty state helper */
.sp-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--sp-text-3);
}
.sp-empty i { font-size: 2.1rem; color: var(--sp-border-strong); display: block; margin-bottom: .8rem; }
.sp-empty .sp-empty-title { color: var(--sp-text-2); font-weight: 700; font-size: .98rem; margin-bottom: .2rem; }
.sp-empty .sp-empty-desc { font-size: .85rem; }

/* Apadana base ships table-list thead with !important — retake control */
table.table-list thead th, .table-list thead th {
    background-color: var(--sp-surface-2) !important;
    color: var(--sp-text-3) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--sp-border) !important;
    text-align: right;
}
.table-list tbody td a, .dataTable tbody td a { color: var(--sp-text); font-weight: 500; }
.table-list tbody td a:hover { color: var(--sp-primary); }
.table-list tbody td strong a { font-weight: 700; }

/* Apadana hardcodes white cells + fat white borders on table-list rows */
.table-list>tbody>tr>td, table.table-list>tbody>tr>td {
    background-color: transparent;
    border: 0;
    border-bottom: 1px solid var(--sp-border-faint);
}
.table-list>tbody>tr:last-child>td { border-bottom: 0; }
.table-list>tbody>tr:hover>td, table.table-list>tbody>tr:hover>td { background-color: var(--sp-primary-softer); }
.table-list>tbody>tr:hover { cursor: pointer; }

/* ==========================================================================
   17. AUTH PAGES (login / register / password reset)
   ========================================================================== */

.sp-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    background: var(--sp-bg);
}
.sp-auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem clamp(1.5rem, 6vw, 5rem);
    background: var(--sp-surface);
    border-left: 1px solid var(--sp-border);
    position: relative;
}
.sp-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-weight: 800;
    font-size: 1.08rem;
    color: var(--sp-text);
    margin-bottom: 2.6rem;
    align-self: flex-start;
}
.sp-auth-brand img { max-height: 34px; }
.sp-auth-head h1 { font-size: 1.55rem; margin-bottom: .45rem; }
.sp-auth-head p { color: var(--sp-text-3); font-size: .9rem; margin-bottom: 1.6rem; }
.sp-auth-actions { display: flex; gap: .6rem; margin-top: 1.4rem; }
.sp-auth-actions .btn { flex: 1; }
.sp-auth-foot {
    margin-top: 1.7rem;
    padding-top: 1.3rem;
    border-top: 1px solid var(--sp-border-faint);
    font-size: .84rem;
    color: var(--sp-text-3);
    line-height: 2;
}
.sp-theme-toggle-float {
    position: absolute;
    top: 1.4rem;
    left: 1.4rem;
    z-index: 20;
}

.sp-auth-aside {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3rem clamp(1.5rem, 5vw, 6rem);
    background:
        radial-gradient(620px 420px at 78% 22%, var(--sp-primary-soft), transparent 65%),
        radial-gradient(520px 380px at 15% 85%, var(--sp-info-soft), transparent 62%),
        var(--sp-surface-2);
}
.sp-auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--sp-border-faint) 1px, transparent 1px),
        linear-gradient(90deg, var(--sp-border-faint) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 75%);
    pointer-events: none;
}
.sp-auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    pointer-events: none;
}
.sp-auth-orb-1 {
    width: 340px; height: 340px;
    background: var(--sp-primary);
    opacity: .14;
    top: -80px;
    left: -60px;
    animation: sp-float 9s ease-in-out infinite;
}
.sp-auth-orb-2 {
    width: 260px; height: 260px;
    background: var(--sp-info);
    opacity: .1;
    bottom: -60px;
    right: -40px;
    animation: sp-float 11s ease-in-out infinite reverse;
}
@keyframes sp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-26px); }
}
.sp-auth-aside-inner { position: relative; max-width: 30rem; }
.sp-auth-aside h2 { font-size: 1.6rem; line-height: 1.5; }
.sp-auth-aside h2 em { font-style: normal; color: var(--sp-primary); }
.sp-auth-aside p { color: var(--sp-text-2); }

@media (max-width: 991.98px) {
    .sp-auth { grid-template-columns: 1fr; }
    .sp-auth-aside { display: none; }
    .sp-auth-panel { border-left: 0; min-height: 100vh; }
}

/* OAuth / linked account buttons */
.sp-auth .linked-account, .linked-account { margin-bottom: .5rem; }
.btn-oauth {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    color: var(--sp-text);
    border-radius: 10px;
    font-weight: 600;
}
.btn-oauth:hover { background: var(--sp-surface-3); color: var(--sp-text); }

/* ==========================================================================
   18. SUPPORT TICKETS
   ========================================================================== */

.ticket-replies { margin-bottom: 1.5rem; }
.sp-ticket-msg {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--sp-shadow-xs);
}
.sp-ticket-msg .header {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    padding: .8rem 1.15rem;
    border-bottom: 1px solid var(--sp-border-faint);
    background: var(--sp-surface-2);
    font-size: .85rem;
    color: var(--sp-text-3);
}
.sp-ticket-msg .header strong { color: var(--sp-text); font-size: .9rem; }
.sp-ticket-msg .header .mr-auto { margin-inline-start: auto; }
.sp-ticket-msg .replies-user-image { border-radius: 50%; box-shadow: var(--sp-shadow-xs); }
.sp-ticket-msg .body {
    padding: 1.15rem 1.3rem;
    color: var(--sp-text);
    font-size: .92rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.sp-ticket-msg.admin-reply { border-color: var(--sp-primary-ring); }
.sp-ticket-msg.admin-reply .header { background: var(--sp-primary-softer); }
.sp-ticket-msg.admin-reply .header strong { color: var(--sp-primary); }
.sp-ticket-msg .attachments { color: var(--sp-text-3); font-size: .85rem; }
.sp-ticket-msg .attachments a { font-family: 'JetBrains Mono', monospace; font-size: .8rem; }

.ticket-tit { font-weight: 800; }
.ticket-des { color: var(--sp-text-3); font-size: .85rem; }
.ticket-des strong { color: var(--sp-text-2); }
.ticket-number { color: var(--sp-primary); font-weight: 600; margin-inline-end: .5rem; }
.ticket-subject.unread { font-weight: 700; color: var(--sp-text); }
.ticket-subject { font-weight: 500; color: var(--sp-text-2); }
.ticket-subject.unread::after {
    content: "";
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--sp-primary);
    margin-inline-start: .45rem;
    vertical-align: middle;
}
.ticket-modals .markdown-editor { min-height: 160px; }

/* Markdown editor (SimpleMDE) reskin */
.CodeMirror, .editor-toolbar {
    background: var(--sp-surface);
    color: var(--sp-text);
    border-color: var(--sp-border) !important;
    border-radius: 10px;
}
.editor-toolbar a { color: var(--sp-text-3) !important; border-radius: 6px; }
.editor-toolbar a.active, .editor-toolbar a:hover { color: var(--sp-primary) !important; border-color: var(--sp-border-strong); background: var(--sp-surface-3); }
.editor-toolbar.disabled { opacity: .5; }
.CodeMirror-gutters { background: var(--sp-surface-2); border-color: var(--sp-border); }
.CodeMirror-cursor { border-color: var(--sp-primary); }
.CodeMirror-selected { background: var(--sp-primary-ring) !important; }

/* ==========================================================================
   19. INVOICE PAGE (uses invoice-sina.css as base, re-skinned via tokens)
   ========================================================================== */

.card.card-body.invoice-wrap, .card .invoice-container { background: transparent; }
.invoice-container { color: var(--sp-text); }
.invoice-container .personal { background: var(--sp-surface-2); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg); padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; }
.invoice-container .personal-title { font-size: .8rem; font-weight: 700; color: var(--sp-text-3); letter-spacing: .03em; margin-bottom: .6rem; }
.invoice-container .personal-details p { margin: 0 0 .2rem; color: var(--sp-text-2); font-size: .9rem; line-height: 1.9; }
.invoice-container .invoice-details { background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg); padding: 1.4rem; box-shadow: var(--sp-shadow-xs); }
.invoice-container .invoice-info { background: var(--sp-surface-2); border: 1px solid var(--sp-border-faint); border-radius: 12px; padding: .75rem .9rem; margin-bottom: 1.2rem; font-size: .85rem; color: var(--sp-text-2); }
.invoice-container .invoice-info .sp-mono { font-weight: 600; }
.invoice-container .invoice-items, .invoice-container .transactions-table { margin-bottom: 1.2rem; }
.invoice-container .invoice-items tr:last-child td, .invoice-container .transactions-table tr:last-child td { border-bottom: 0; }
.invoice-container .invoice-items .total-row td {
    background: var(--sp-primary-softer);
    color: var(--sp-primary);
    font-weight: 800;
    font-size: 1rem;
    border-top: 2px solid var(--sp-primary-ring);
}
.invoice-container .transactions-title {
    font-size: .86rem;
    font-weight: 700;
    color: var(--sp-text-2);
    margin: .6rem 0 .8rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.invoice-container .transactions-title::after { content: ""; flex: 1; height: 1px; background: var(--sp-border-faint); }
.invoice-status-top { margin: 0; }
.invoice-status-top span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: var(--sp-radius-full);
    font-size: .78rem;
    font-weight: 700;
    padding: .34rem .9rem;
}
.invoice-status-top span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.invoice-status-top .paid { background: var(--sp-success-soft); color: var(--sp-success); }
.invoice-status-top .unpaid { background: var(--sp-danger-soft); color: var(--sp-danger); }
.invoice-status-top .draft { background: var(--sp-info-soft); color: var(--sp-info); }
.invoice-status-top .refunded, .invoice-status-top .cancelled, .invoice-status-top .collections { background: var(--sp-warning-soft); color: var(--sp-warning); }
.invoice-container .form-payment-method select { max-width: 220px; }
.invoice-btns .btn { min-width: 150px; }

/* ==========================================================================
   20. DOMAIN & SERVICE DETAIL PAGES
   ========================================================================== */

.service-attributes, .domain-attributes { color: var(--sp-text-2); }
.ssl-info img { filter: drop-shadow(0 1px 2px rgba(0,0,0,.12)); }
[data-theme="dark"] .ssl-info img:not([src*="ssl-inactive"]) { border-radius: 50%; background: rgba(255,255,255,.92); padding: 1px; }

/* Usage dials (WHMCS knob) */
.knob-container, .usage-dial { color: var(--sp-text); }
[data-theme="dark"] canvas.jknob { filter: invert(1) hue-rotate(180deg) brightness(1.15); }

/* Client area widget cards (product usage, addon panels) */
.client-panel { background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg); }

/* serverstatus */
.server-status-widget .progress { height: 8px; }

/* ==========================================================================
   21. KNOWLEDGEBASE / DOWNLOADS / ANNOUNCEMENTS
   ========================================================================== */

.kb-article-card, .download-card, .announcement-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 1.1rem 1.2rem;
    transition: border-color var(--sp-t-fast) var(--sp-ease), box-shadow var(--sp-t-fast) var(--sp-ease), transform var(--sp-t-fast) var(--sp-ease);
}
.kb-article-card:hover, .download-card:hover, .announcement-card:hover {
    border-color: var(--sp-primary-ring);
    box-shadow: var(--sp-shadow-sm);
    transform: translateY(-1px);
}

/* ==========================================================================
   22. FOOTER
   ========================================================================== */

.sp-footer {
    border-top: 1px solid var(--sp-border);
    background: var(--sp-surface);
    padding: 3rem 0 2rem;
    margin-top: 2rem;
}
.sp-footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2.5rem;
    padding-bottom: 2.25rem;
    border-bottom: 1px solid var(--sp-border-faint);
}
.sp-footer-about p {
    color: var(--sp-text-3);
    font-size: .85rem;
    line-height: 2;
    margin-top: 1rem;
    max-width: 20rem;
}
.footer-title {
    font-size: .84rem;
    font-weight: 700;
    color: var(--sp-text);
    margin-bottom: 1rem;
    letter-spacing: .01em;
}
.sp-footer ul { list-style: none; margin: 0; padding: 0; }
.sp-footer ul li { margin-bottom: .55rem; }
.sp-footer ul a {
    color: var(--sp-text-3);
    font-size: .86rem;
    transition: color var(--sp-t-fast) var(--sp-ease), padding var(--sp-t-fast) var(--sp-ease);
    display: inline-block;
}
.sp-footer ul a:hover { color: var(--sp-primary); transform: translateX(-2px); }
.sp-footer .copyright, .sp-footer .sp-copyright {
    padding-top: 1.5rem;
    color: var(--sp-text-3);
    font-size: .8rem;
    text-align: center;
}
.sp-footer .copyright a, .sp-footer .sp-copyright a { color: var(--sp-text-2); }

@media (max-width: 991.98px) {
    .sp-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .sp-footer-about { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
    .sp-footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   23. CART / ORDER FORM  (#order-standard_cart)
   ========================================================================== */

#order-standard_cart { font-family: 'Vazirmatn', sans-serif; color: var(--sp-text); }
#order-standard_cart .cart-sidebar { float: right; }
#order-standard_cart .cart-body { float: left; }
#order-standard_cart .header-lined h1 { font-size: 1.5rem; font-weight: 800; }
#order-standard_cart .header-lined { border-bottom: 1px solid var(--sp-border); padding-bottom: 1.1rem; margin-bottom: 1.4rem; }

#order-standard_cart .category-bg, #order-standard_cart .top-nav { background: transparent; border: 0; }
#order-standard_cart .cart-sidebar .list-group-item {
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--sp-text-2);
    font-weight: 600;
    font-size: .88rem;
    padding: .6rem .9rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    transition: all var(--sp-t-fast) var(--sp-ease);
}
#order-standard_cart .cart-sidebar .list-group-item:hover { background: var(--sp-surface-3); color: var(--sp-text); }
#order-standard_cart .cart-sidebar .list-group-item.active {
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
}
#order-standard_cart .cart-sidebar .list-group-item i { width: 1.3rem; text-align: center; color: var(--sp-text-3); }
#order-standard_cart .cart-sidebar .list-group-item.active i { color: var(--sp-primary); }

#order-standard_cart .product {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 1.35rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color var(--sp-t) var(--sp-ease), box-shadow var(--sp-t) var(--sp-ease), transform var(--sp-t) var(--sp-ease);
    position: relative;
    overflow: hidden;
}
#order-standard_cart .product:hover {
    border-color: var(--sp-primary-ring);
    box-shadow: var(--sp-shadow-md);
    transform: translateY(-3px);
}
#order-standard_cart .product .name { font-size: 1.05rem; font-weight: 800; color: var(--sp-text); }
#order-standard_cart .product .pricing { font-family: 'JetBrains Mono', 'Vazirmatn', monospace; color: var(--sp-primary); font-weight: 700; }
#order-standard_cart .product .feature { color: var(--sp-text-2); font-size: .86rem; line-height: 2; }
#order-standard_cart .product .feature i { color: var(--sp-success); }
#order-standard_cart .product-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--sp-primary);
    color: var(--sp-on-primary);
    font-size: .68rem;
    font-weight: 700;
    border-radius: 99px;
    padding: .2rem .65rem;
    letter-spacing: .02em;
}

#order-standard_cart .summary-block, #order-standard_cart .order-summary {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
}
#order-standard_cart .order-summary .summary-item { color: var(--sp-text-2); font-size: .88rem; }
#order-standard_cart .order-summary .summary-total, #order-standard_cart .order-summary .total-due-today {
    border-top: 1px solid var(--sp-border);
    font-weight: 800;
    color: var(--sp-text);
    font-size: 1.05rem;
}
#order-standard_cart .order-summary .summary-total .amount { font-family: 'JetBrains Mono', monospace; color: var(--sp-primary); }

#order-standard_cart .promotion input[type=text], #order-standard_cart .promo-code input {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    color: var(--sp-text);
    border-radius: 10px;
}
#order-standard_cart .panel-default { background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg); }
#order-standard_cart .panel-heading { background: var(--sp-surface-2); border: 0; border-bottom: 1px solid var(--sp-border); color: var(--sp-text); font-weight: 700; border-radius: var(--sp-radius-lg) var(--sp-radius-lg) 0 0; }
#order-standard_cart .domain-options-box, #order-standard_cart .domainregister-choices .option {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    transition: border-color var(--sp-t-fast) var(--sp-ease), box-shadow var(--sp-t-fast) var(--sp-ease);
}
#order-standard_cart .domain-options-box:hover { border-color: var(--sp-primary-ring); box-shadow: var(--sp-shadow-xs); }
#order-standard_cart .checkbox-row { color: var(--sp-text-2); }
#order-standard_cart .domain-price { font-family: 'JetBrains Mono', monospace; color: var(--sp-text); font-weight: 600; }
#order-standard_cart .step-text, #order-standard_cart h2.step-title { color: var(--sp-text); }
#order-standard_cart .checkout-steps { color: var(--sp-text-3); }

/* Cart table */
#order-standard_cart table.cart, #order-standard_cart .cart-table { background: var(--sp-surface); border-radius: var(--sp-radius-lg); }

/* ==========================================================================
   24. STORE (MarketConnect) SOFT RESKIN
   ========================================================================== */

.store-catalog, .store-page { color: var(--sp-text); }
.store-card, .product-card {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    transition: border-color var(--sp-t) var(--sp-ease), box-shadow var(--sp-t) var(--sp-ease), transform var(--sp-t) var(--sp-ease);
}
.store-card:hover, .product-card:hover { border-color: var(--sp-primary-ring); box-shadow: var(--sp-shadow-md); transform: translateY(-2px); }
[data-theme="dark"] .store-header, [data-theme="dark"] .promo-banner { background-color: var(--sp-surface); }

/* ==========================================================================
   25. MISC PAGE-LEVEL HELPERS
   ========================================================================== */

/* Verification / info banners at top of main body */
#main-body .alert { margin-bottom: 1.5rem; }

/* Announcement single view */
.viewannouncement .announcement-body, .announcement-body { color: var(--sp-text-2); line-height: 2; }

/* Knowledgebase article body */
.kbarticle-content, .knowledgebase-article-body { color: var(--sp-text-2); line-height: 2; }
.kbarticle-content img, .knowledgebase-article-body img { border-radius: 12px; border: 1px solid var(--sp-border); }

/* Affiliate summary tiles */
.affiliate-summary .card { height: 100%; }

/* 2FA / security page */
#twoFactorAuth .btn-group { flex-wrap: wrap; }

/* Contacts table avatar */
.client-avatar, .user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--sp-primary-soft);
    color: var(--sp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .78rem;
}

/* WHOIS / domain contact forms */
#modalWhois .form-group { margin-bottom: .9rem; }

/* Forward page (download redirect) */
.forwardpage-card { background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg); }

/* Print */
@media print {
    .sp-header, .sp-footer, .master-breadcrumb, .btn, .sp-theme-toggle, .sp-header-actions, .sp-navbar-toggler,
    .sidebar, .dataTables_filter, .dataTables_paginate, .dataTables_length, #fullpage-overlay, .invoice-btns { display: none !important; }
    body, .card { background: #fff !important; color: #000 !important; }
    .card { border: 0 !important; box-shadow: none !important; }
}

/* Focus visibility for keyboard users on dark surfaces */
[data-theme="dark"] ::selection { background: rgba(251, 113, 133, .32); }

/* High contrast safety: never let legacy white surfaces leak in dark mode */
[data-theme="dark"] .bg-white:not(.keep-white),
[data-theme="dark"] .card.bg-white,
[data-theme="dark"] .modal-content.bg-white {
    background-color: var(--sp-surface) !important;
}
[data-theme="dark"] .text-dark { color: var(--sp-text) !important; }
[data-theme="dark"] .border-light { border-color: var(--sp-border) !important; }

/* Legacy hero classes kept from v1 for backward compatibility */
.sp-topbar { display: none; }


/* ==========================================================================
   26. TABLE CONTAINER CARD (list pages)
   ========================================================================== */

.table-container.clearfix, .table-container {
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--sp-shadow-xs);
}
.table-container > h5 { color: var(--sp-text); font-weight: 700; font-size: 1.02rem; }
.table-container > p { color: var(--sp-text-3); font-size: .86rem; }

/* ==========================================================================
   27. INVOICE SINA SKIN NEUTRALISATION (loads after sepanta.css from body)
   ========================================================================== */

body .invoice-container .invoice-info {
    background: var(--sp-surface-2) !important;
    border: 1px solid var(--sp-border-faint) !important;
    border-right: 4px solid var(--sp-primary) !important;
    color: var(--sp-text-2) !important;
    border-radius: 10px;
}
body .invoice-container .personal {
    background: var(--sp-surface-2) !important;
    border: 1px solid var(--sp-border) !important;
    border-radius: var(--sp-radius-lg) !important;
}
body .invoice-container .personal-title { color: var(--sp-text-3) !important; }
body .invoice-container .personal-details p { color: var(--sp-text-2) !important; }
body .invoice-container .invoice-items td, body .invoice-container .transactions-table td {
    color: var(--sp-text-2) !important;
    border-color: var(--sp-border-faint) !important;
    background: transparent !important;
}
body .invoice-container .invoice-items tr:first-child td {
    color: var(--sp-text-3) !important;
    font-weight: 700;
    background: var(--sp-surface-2) !important;
}
body .invoice-container .invoice-items .total-row td {
    background: var(--sp-primary-softer) !important;
    color: var(--sp-primary) !important;
    border-top: 2px solid var(--sp-primary-ring) !important;
    border-bottom: 0 !important;
}
body .invoice-container .transactions-title span { color: var(--sp-text-2) !important; }
body .invoice-details.apply-credit { background: var(--sp-warning-soft); border-radius: var(--sp-radius-lg); color: var(--sp-text); }
body .invoice-details.apply-credit p, body .invoice-details.apply-credit strong { color: inherit; }
body .invoice-btns .btn { min-width: 150px; }

/* ==========================================================================
   26. TABLE CONTAINER CARD (list pages)
   ========================================================================== */

.table-container.clearfix, .table-container {
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--sp-shadow-xs);
}
.table-container > h5 { color: var(--sp-text); font-weight: 700; font-size: 1.02rem; }
.table-container > p { color: var(--sp-text-3); font-size: .86rem; }

/* ==========================================================================
   27. INVOICE SINA SKIN NEUTRALISATION (loads after sepanta.css from body)
   ========================================================================== */

body .invoice-container .invoice-info {
    background: var(--sp-surface-2) !important;
    border: 1px solid var(--sp-border-faint) !important;
    border-right: 4px solid var(--sp-primary) !important;
    color: var(--sp-text-2) !important;
    border-radius: 10px;
}
body .invoice-container .personal {
    background: var(--sp-surface-2) !important;
    border: 1px solid var(--sp-border) !important;
    border-radius: var(--sp-radius-lg) !important;
}
body .invoice-container .personal-title { color: var(--sp-text-3) !important; }
body .invoice-container .personal-details p { color: var(--sp-text-2) !important; }
body .invoice-container .invoice-items td, body .invoice-container .transactions-table td {
    color: var(--sp-text-2) !important;
    border-color: var(--sp-border-faint) !important;
    background: transparent !important;
}
body .invoice-container .invoice-items tr:first-child td {
    color: var(--sp-text-3) !important;
    font-weight: 700;
    background: var(--sp-surface-2) !important;
}
body .invoice-container .invoice-items .total-row td {
    background: var(--sp-primary-softer) !important;
    color: var(--sp-primary) !important;
    border-top: 2px solid var(--sp-primary-ring) !important;
    border-bottom: 0 !important;
}
body .invoice-container .transactions-title span { color: var(--sp-text-2) !important; }
body .invoice-details.apply-credit { background: var(--sp-warning-soft); border-radius: var(--sp-radius-lg); color: var(--sp-text); }
body .invoice-details.apply-credit p, body .invoice-details.apply-credit strong { color: inherit; }
body .invoice-btns .btn { min-width: 150px; }
[data-theme="dark"] body .invoice-container,
[data-theme="dark"] body .invoice-container .invoice-details { color: var(--sp-text-2); }


/* ==========================================================================
   28. LEGACY NEUTRALISATION
   ========================================================================== */

/* Apadana paints 14px dashed white borders on every .container-fluid */
.container-fluid { border: 0 !important; }


/* Register page — wider panel + two-column form grid */
.sp-auth-panel-wide { max-width: none; }
.sp-auth-register .sp-auth-panel { padding-block: 2.5rem; }
.sp-auth-register form .row { margin-inline: -.4rem; }
.sp-auth-register form .row > [class*="col"] { padding-inline: .4rem; }
.sp-auth-register h1 { font-size: 1.4rem; }
