/* The stock WHMCS theme (theme.css/theme.min.css, unmodified core files)
   colors every ".status-*"/".label-*" badge (invoice/ticket/domain/order
   status pills) using ITS OWN token names — "--error", "--neutral",
   "--neutral-accented", "--yellow-300", "--bg-inverted", "--grayscale",
   "--notice" — which this site's own design system
   (nivahost-design-system.css) never defines. With no value, the
   "background-color: var(--error)" (etc.) declarations resolve to nothing,
   so the badge keeps its default transparent background — this is why the
   "پرداخت نشده" (Unpaid) invoice-status badge looked washed out with no
   fill color. Rather than overriding every individual ".status-unpaid" etc.
   rule one at a time, aliasing the missing stock-theme tokens to this
   site's real brand tokens here fixes every badge in this family at once. */
:root {
  --error: var(--danger);
  --yellow-300: #ffe066;
  --neutral: var(--black-40);
  --neutral-accented: var(--black-30);
  --neutral-lifted: var(--black-70);
  --bg-inverted: var(--black);
  --grayscale: var(--black-40);
  --notice: #6f42c1;
}

/* Same missing-token bug, much bigger blast radius: theme.css/theme.min.css
   round practically everything (alerts, cards, inputs, buttons, modals,
   dropdowns, tables, ...) via "--rounding-sm"/"--rounding-md"/"--rounding-lg"
   — used 140+ times across the stock stylesheet — but this site's design
   system never defines any of the three, so every one of those elements
   silently renders with square corners. This is the actual root cause
   behind several individual alert/card corner fixes made earlier in this
   project one element at a time (e.g. ".niva-serverstatus-alert"); defining
   the tokens here fixes the whole family at once, including elements not
   explicitly touched yet (domain-contact-info error/success alerts, etc.).
   Values match this project's established radius scale (0.625rem is the
   size used everywhere else for cards/buttons/alerts). */
:root {
  --rounding-sm: 0.375rem;
  --rounding-md: 0.625rem;
  --rounding-lg: 1rem;
}

/* "--bg-inverted" above is correct for the many buttons/footer rules that
   already used it intentionally (checkout button, .btn-primary, footer,
   etc. — all were themselves invisible/broken before this file defined the
   variable). But theme.min.css also has a bare "body,html{background-color:
   var(--bg-inverted)}" rule; something else already overrides body back to
   white, but nothing overrides html, so defining the variable turned the
   <html> element solid black — visible as a stray black bar wherever page
   content is shorter than the <html> box (e.g. the "خلاصه وضعیت مالی" card
   on clientareaproductdetails). Pinning it back to white here, same
   specificity as the offending rule but later in the cascade so it wins. */
html {
  background-color: #fff;
}

/* WHMCS core's "Pay All"/"Add Funds" card-footer buttons (outstanding-
   invoices sidebar widget) use Bootstrap 3's ".col-xs-6" grid class, which
   doesn't exist in this Bootstrap 4 build — with no width/float rule
   actually applying, both buttons just render at their natural
   shrink-to-fit block width and stack instead of sitting side by side.
   Also shrinking them (smaller padding, tighter icon gap) per request. */
body [menuitemname="My Invoices Summary"] .card-footer.clearfix {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
body [menuitemname="My Invoices Summary"] .col-button-left,
body [menuitemname="My Invoices Summary"] .col-button-right {
  float: none;
  width: auto;
  padding: 0;
}
/* "#main-body .btn" (niva-clientarea.css) outranks the plain-class
   selector above on specificity alone — matching its "#main-body" prefix
   here so these overrides actually win instead of losing silently. */
#main-body [menuitemname="My Invoices Summary"] .col-button-left .btn,
#main-body [menuitemname="My Invoices Summary"] .col-button-right .btn {
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}
#main-body [menuitemname="My Invoices Summary"] .col-button-left .btn i,
#main-body [menuitemname="My Invoices Summary"] .col-button-right .btn i {
  margin-left: 0.3125rem;
}

/* Several of Bootstrap's stock ".row" elements in the cart flow (the
   featured-TLD cards row, the two promo-card columns, individual pricing-
   table rows) use the standard "-12px" gutter margin that's meant to be
   canceled out by a ".container" ancestor's matching padding — but these
   rows sit directly under plain divs with no such padding, so the row
   quietly extends ~12px past the actual page edge on both sides. Invisible
   on desktop (there's slack space around the content), but on narrow
   mobile viewports that overflow becomes real, page-wide horizontal
   scroll. Clipping it here is the standard fix for this exact Bootstrap
   gutter-bleed pattern, rather than chasing down every individual row. */
/* NOTE: this is deliberately "body" only, not "html" — adding overflow-x
   to "html" as well briefly moved the page's main vertical scrollbar to
   the left edge (this document's RTL direction governs scrollbar side
   for whichever element the browser treats as the actual viewport
   scroller, and explicitly declared overflow on "html" made it take over
   that role instead of "body"). Clipping on "body" alone still fully
   contains the Bootstrap gutter-bleed described below, without changing
   which element scrolls the page or which side its scrollbar lands on. */
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Main header nav items ("اخبار", "فروشگاه", etc.) use uneven top/bottom
   padding (6px/8px) on the hover/active highlight box — the link text
   inside fills that box exactly with no room left to self-center, so it
   sits 2px closer to the top than the bottom of its own hover background. */
.app-header-main-list-item {
  padding-top: 0.4375rem;
  padding-bottom: 0.4375rem;
}


/* ==========================================================================
   Nivahost — WHMCS client-area theme
   Base look/feel (colors, fonts, header, footer, mega-menu) comes from
   nivahost-design-system.css and nivahost-components.css, copied verbatim
   from the Nivahost marketing site so the client area matches it exactly.
   This file only adds the small set of things WHMCS itself needs that the
   marketing site never had (cart badge, WHMCS's own buttons/links, etc).
   ========================================================================== */

/* The browser's default focus ring (that thick blue box on inputs/buttons)
   fights with our own focus styling (border-color highlight, etc.) and
   looks out of place next to the rest of the design. Site-wide removal. */
input:focus,
textarea:focus,
select:focus,
button:focus,
.form-control:focus,
.btn:focus {
  outline: none !important;
  box-shadow: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Nexus/Bootstrap's default page-content links (submitticket department
   list, knowledgebase, invoices, etc.) render underlined with the browser's
   default blue-ish link color. Scoped to #main-body so it only touches
   actual page content, never the header/footer nav components — those
   already have their own correct no-underline + hover-color rules with
   higher specificity, so this never overrides them. */
#main-body a {
  text-decoration: none;
}
/* ":not(.btn)" here is the actual fix for a bug that kept resurfacing:
   any <a class="btn btn-primary/btn-warning/...">-style button is also
   just an "a" to this selector, and #main-body's ID makes it outrank a
   plain ".btn-primary:hover"/".btn-warning:hover" class rule — so without
   this exclusion, EVERY anchor-tag button on any #main-body page loses
   its real hover color to this brownish-gold link color instead, no
   matter how many individual buttons get patched one at a time. */
#main-body a:not(.btn):hover {
  color: #B8860B;
  text-decoration: none;
}

.btn-primary,
.btn.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--black);
  font-weight: 700;
}
.btn-primary:hover,
.btn.btn-primary:hover {
  background-color: var(--primary-30) !important;
  border-color: var(--primary-30) !important;
  color: var(--black) !important;
}
/* Same broken-variable bug as ".btn-primary:hover" above, on the sibling
   ".btn-default" class this time: theme.min.css's own hover rule sets
   "background-color: var(--grayscale-lifted)" — a token that isn't
   defined anywhere in this theme, so the whole background/border
   declaration is invalid and drops out, leaving just its "color: white"
   half in effect. Result: white text on a now-transparent background,
   invisible on any white card (markdown editor toolbar buttons, and any
   other plain ".btn-default" that isn't already covered by one of this
   file's own more specific hover rules elsewhere). A real, valid color
   pair here acts as the sane fallback for all of them. */
.btn-default:hover,
.btn.btn-default:hover {
  background-color: var(--black-95, #f0f0f0) !important;
  border-color: var(--black-90, #ccc) !important;
  color: #08111b !important;
}
/* Same broken "--grayscale-lifted" token, this time on ".btn-success"
   specifically inside ".sidebar" widgets (e.g. the ticket-info panel's
   "پاسخ" quick-action) — background/border drop out on hover, leaving just
   "color: white" in effect, so the label vanished against the (now
   effectively transparent, i.e. white-card) background. */
.sidebar .btn-success:hover {
  background-color: #218838 !important;
  border-color: #1e7e34 !important;
  color: #fff !important;
}
/* Bootstrap's own ".btn-primary:not(:disabled):not(.disabled):active" (its
   "pressed" state, which is what actually shows during/right after a
   click, not just :hover) is more specific than the plain rules above and
   falls back to Bootstrap's stock blue — never overridden until now. */
.btn-primary:active,
.btn-primary:focus,
.btn-primary.active,
.btn.btn-primary:active,
.btn.btn-primary:focus,
.btn.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
  background-color: var(--primary-30) !important;
  border-color: var(--primary-30) !important;
  color: var(--black) !important;
  box-shadow: none !important;
}
/* ".btn-warning" (used for the hosting promo card's own CTA) never had a
   brand override at all — same treatment as .btn-primary above, so it
   matches instead of falling back to Bootstrap's stock warning yellow. */
.btn-warning,
.btn.btn-warning {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--black);
  font-weight: 700;
}
.btn-warning:hover,
.btn.btn-warning:hover,
.btn-warning:active,
.btn-warning:focus,
.btn.btn-warning:active,
.btn.btn-warning:focus,
.btn-warning:not(:disabled):not(.disabled):active {
  background-color: var(--primary-30) !important;
  border-color: var(--primary-30) !important;
  color: var(--black) !important;
  box-shadow: none !important;
}
/* theme.css has a one-off "#btnDomainContinue { background: rgb(0,0,0) }"
   rule for this exact button (the "ادامه" step-submit on the configure-
   domain page) — an ID beats every ".btn-primary" class rule above, which
   is why it rendered as our dark navy text on a literally black button
   (i.e. invisible) instead of picking up the yellow everywhere else uses. */
#btnDomainContinue {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--black) !important;
}

/* Cart icon badge — WHMCS-only addition, the marketing header has no cart */
.app-header-cart-badge {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  background: var(--danger);
  color: var(--white);
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  line-height: 1;
}
html[dir="rtl"] .app-header-cart-badge {
  left: auto;
  right: 0.125rem;
}

/* Notification bell — WHMCS-only addition (real $clientAlerts), matching
   Nexus's own topbar behavior: the button is always shown when logged in,
   only the dot badge and panel contents depend on whether there are any
   alerts. */
.app-header-button-login-holder {
  position: relative;
}
.app-header-notification-badge {
  min-width: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
}
html[dir="rtl"] .app-header-notification-badge {
  left: auto;
  right: 0.125rem;
}
.app-header-notification-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  width: 18rem;
  max-width: 80vw;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.5rem rgba(8, 17, 27, 0.16);
  z-index: 20;
  direction: rtl;
}
.app-header-notification-panel.is-open {
  display: block;
}
.app-header-notification-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  max-height: 20rem;
  overflow-y: auto;
}
.app-header-notification-list li a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: var(--black);
  text-decoration: none;
}
.app-header-notification-list li a:hover {
  background: var(--gray);
}
.app-header-notification-empty {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--black-30);
}

/* Nexus's own Bootstrap base (all.min.css/theme.min.css — still loaded for
   the WHMCS pages we haven't redesigned yet) gives every <ul> a default
   margin-bottom. The marketing site never loads Bootstrap, so it never had
   to zero this out on its own nav lists; ours does. That stray bottom
   margin throws off vertical centering in the header row (looks like the
   menu items sit too high). Zero it out on the lists we build ourselves. */
.app-header-main-list,
.app-header-top-list,
.app-header-main-mobile-list,
.app-header-nav,
.app-footer-nav {
  margin: 0;
}

/* The top bar's height comes purely from its link text's line-height (the
   design system references a --app-header-top-height variable that's never
   actually defined, so it has no effect) — giving it almost no breathing
   room. Add a bit of vertical padding so the bar reads taller. */
.app-header-top-list {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* ==========================================================================
   Footer — WHMCS-specific additions (locale button; the marketing footer
   uses different links entirely, but the visual chrome is app-footer-*)
   ========================================================================== */

.app-footer-locale-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--black-90);
  border-radius: 2rem;
  background: none;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--black-30);
  cursor: pointer;
}
.app-footer-locale-btn:hover {
  color: var(--black);
  border-color: var(--black-50);
}

/* ==========================================================================
   RTL correction
   ----------------------------------------------------------------------
   The marketing site (localhost/new/) never sets dir="rtl" on <html> — it
   only marks individual text blocks as RTL and otherwise relies on the
   browser's default LTR document flow. Our template sets dir="rtl" on
   <html> globally (needed for WHMCS's own RTL/LTR language switching), so
   any flex row from the copied CSS that depended on that default LTR flow
   now visually mirrors. This section re-flips those specific rows back to
   match the marketing site's actual look. Add more rules here as they turn
   up on other pages — same root cause each time.
   ========================================================================== */

@media (min-width: 62rem) {
  html[dir="rtl"] .app-footer-social {
    flex-direction: row-reverse;
  }
}

/* The copied CSS inherits `text-align: left` on <body> (from Nexus's own
   Bootstrap base styles) with nothing to flip it back for RTL — so any text
   block that doesn't set its own explicit text-align renders left-aligned
   even though it reads right-to-left. Fix it once at the root instead of
   patching every individual component class. */
html[dir="rtl"] body {
  text-align: right;
}

/* Same root cause again: the marketing site's social icon row spaces items
   with margin-left on "not(:first-child)", which assumes LTR flex flow (so
   the gap lands between each item and the one before it). Under RTL flex
   flow the gap lands on the wrong side of each icon instead, so two of the
   three end up touching. `gap` spaces flex children the same way regardless
   of direction, so use that instead and cancel the mismatched margins. */
html[dir="rtl"] .app-footer-social-links ul {
  gap: 1.75rem;
}
html[dir="rtl"] .app-footer-social-links li:not(:first-child) {
  margin-left: 0;
}

/* Same root cause again: the top-bar list uses `justify-content: flex-end`,
   which packs items at the main-end. On the marketing site (implicit LTR)
   main-end is the right edge, so the links sit flush against it. Under our
   dir="rtl", main-end flips to the left, so the same rule pushed the links
   to the left instead with empty space on the right. flex-start is main-end's
   RTL mirror (right edge), which is what we actually want here. */
html[dir="rtl"] .app-header-top-list {
  justify-content: flex-start;
}

/* Same root cause again: Nexus's own verification-banner (email/account
   validation notices — not part of our redesign, still using stock
   theme.min.css) floats its warning icon left with right-side padding, so
   in LTR it sits flush against the message text that wraps to its right.
   Under RTL the float doesn't mirror on its own, so the icon drifts to the
   far left, detached from the text that now starts on the right. */
html[dir="rtl"] .verification-banner .fal,
html[dir="rtl"] .verification-banner .far,
html[dir="rtl"] .verification-banner .fas {
  float: right;
  padding: 2px 0 0 10px;
}

/* The close (×) button's font-size (22px) is larger than the line-height
   it inherits (20px, from Bootstrap's body line-height), so the glyph's
   line box sits a couple pixels off from the button's own vertical center.
   A line-height that isn't smaller than the font-size lets it center
   properly within the flex button. */
.verification-banner .btn.close {
  line-height: 1;
}

/* ==========================================================================
   Homepage domain-search hero — WHMCS-only additions
   The marketing site's hero (niva-domain.css, copied from domain.php) only
   ever needed a single "register" button; WHMCS's real domain checker also
   needs a transfer action and a "view all pricing" link, neither of which
   existed in the original design. Styled to sit quietly under the search
   box without competing with the primary CTA.
   ========================================================================== */

.niva-domain-search {
  flex-wrap: wrap;
}
/* The reCAPTCHA notice (or the box captcha) has no top spacing of its own
   and sat glued to the bottom edge of the search field. */
.domainchecker-homepage-captcha {
  margin-top: 1rem;
}
/* The homepage hero's captcha (native WHMCS verification-code field) was
   still using Nexus's raw, unstyled Bootstrap grid markup — label and input
   sitting bare on the yellow hero background instead of matching the white
   search bar above it. Wrapped in a white card and restyled to match the
   rest of the site's field language (same border/radius as niva-plain-input
   on the login/register pages). */
.domainchecker-homepage-captcha,
.domainchecker-homepage-captcha .col-md-8 {
  width: 100%;
  max-width: none;
  flex: 0 0 100%;
}
.domainchecker-homepage-captcha #default-captcha-domainchecker {
  display: grid;
  width: 100%;
  grid-template-columns: auto auto;
  grid-template-areas: "label label" "input image";
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}
.domainchecker-homepage-captcha #default-captcha-domainchecker p {
  grid-area: label;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #08111b;
  text-align: center;
  width: 100%;
}
.domainchecker-homepage-captcha .captchaimage {
  grid-area: image;
  max-width: none;
  padding: 0;
}
.domainchecker-homepage-captcha #default-captcha-domainchecker > div:last-child {
  grid-area: input;
  max-width: none;
  padding: 0;
}
.domainchecker-homepage-captcha .captchaimage img {
  display: block;
  height: 1.625rem;
  width: auto;
  border-radius: 0.25rem;
}
/* theme.css's own "#default-captcha-domainchecker #inputCaptcha" rule is
   two IDs deep (specificity 2,0,0) and beats our single-ID selector below,
   which is why border-radius kept coming out as its var(--rounding-sm)
   instead of ours. This hero captcha sits outside #main-body (it's part of
   the homepage's domain-search form, #frmDomainHomepage), so that ID is
   used instead to get a third ID in and win outright. */
#frmDomainHomepage #default-captcha-domainchecker #inputCaptcha {
  width: auto;
  max-width: 9rem;
  border: 1px solid var(--black-90);
  border-radius: 0.625rem;
  padding: 0.4375rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease;
}
.domainchecker-homepage-captcha #inputCaptcha:focus {
  outline: none;
  border-color: var(--primary);
}
/* The domain-register page's own captcha box (".default-captcha", not the
   homepage's grid version above) has the code image before the input in
   the markup — correct for how the value gets verified, just rendered
   right-to-left as plain inline content. Correction: the image and input
   actually rendered correctly on plain inline flow (image right, input
   left, matching every other field/icon pairing) — "row-reverse" here
   was based on a wrong reading of that layout and actually flips it
   backwards (row-reverse cancels the RTL flip instead of reinforcing
   it), which is what caused the image to land on the LEFT. Plain "row"
   keeps the flex alignment/gap benefits without reversing anything. */
#order-standard_cart .default-captcha > div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 0.5rem;
}
#order-standard_cart .default-captcha #inputCaptcha {
  margin: 0;
}
/* The stock ".default-captcha" box (grey background, border, shadow) —
   dropped for a cleaner look consistent with the rest of the form, which
   uses plain fields with no extra framing between them. */
#order-standard_cart .default-captcha {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
#order-standard_cart .default-captcha #inputCaptchaImage {
  margin: 0;
}
.niva-domain-search-buttons {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}
.niva-domain-search-buttons button {
  background: #08111b;
  color: var(--primary);
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  white-space: nowrap;
}
.niva-domain-search-buttons button:hover {
  background: var(--black-10);
}
.niva-domain-search-buttons .niva-domain-search-transfer {
  background: var(--primary);
  color: var(--black);
}
.niva-domain-search-buttons .niva-domain-search-transfer:hover {
  background: var(--primary-30);
}
/* Nexus's own theme.min.css bakes in `body #frmDomainHomepage #btnTransfer`
   (two ID selectors) to style its default homepage widget's transfer
   button. We reuse those same IDs on purpose so WHMCS's own JS still finds
   and wires up the button correctly — but that means its ID-based CSS
   outranks any class selector of ours, load order or not. Match it at the
   same specificity to win instead of renaming the ID WHMCS's JS depends on. */
body #frmDomainHomepage #btnTransfer {
  background: var(--primary);
  color: var(--black);
}
body #frmDomainHomepage #btnTransfer:hover {
  background: var(--primary-30);
}
@media (max-width: 33.9375rem) {
  .niva-domain-search {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.5rem;
  }
  .niva-domain-search input {
    padding: 0.5rem 0.25rem;
  }
  .niva-domain-search-buttons {
    width: 100%;
  }
  .niva-domain-search-buttons button {
    flex: 1 1 0;
  }
}

/* Bootstrap's tooltip.css hardcodes its own system font stack, which wins
   over our Dana/Soleil font since it's more specific than inheriting from
   body — every WHMCS-triggered tooltip (like the required-field warning on
   the login captcha) was rendering in the browser's default font instead. */
.tooltip,
.popover {
  font-family: var(--font-family);
}

/* "Return to admin area" ribbon (shown when an admin is logged in as a
   client) — theme.min.css never gave the icon and label any spacing, so
   they sit stuck together. */
.btn-return-to-admin {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}

/* 404 / invalid-link error page — replaces the theme-default blue icon and
   btn-primary/btn-info pair with Nivahost's own yellow/black identity. */
.niva-404 {
  max-width: 32rem;
  margin: 4rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.niva-404-icon {
  margin-bottom: 1.5rem;
}
.niva-404-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #08111b;
  margin: 0 0 0.5rem;
}
.niva-404-subtitle {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #08111b;
  margin: 0 0 0.5rem;
}
.niva-404-description {
  font-size: 0.9375rem;
  color: var(--black-30);
  margin: 0 0 2rem;
  line-height: 1.8;
}
.niva-404-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.niva-404-btn-primary,
.niva-404-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.625rem;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
}
.niva-404-btn-primary {
  background: #08111b;
  color: var(--primary);
  border: 1px solid #08111b;
}
.niva-404-btn-primary:hover {
  background: var(--black-10);
  color: var(--primary);
}
.niva-404-btn-outline {
  background: #fff;
  color: #08111b;
  border: 1px solid var(--black-90);
}
.niva-404-btn-outline:hover {
  border-color: var(--black-50);
  color: #08111b;
}

/* Homepage "How can we help" / "Your account" quick-link grids — Nexus's
   own .action-icon-btns renders these as flat white tiles with washed-out
   gray icons that grow on hover, which reads as lifeless next to the
   yellow/black hero right above it. Card treatment + a yellow icon badge
   (same visual language as the hero's own badges/buttons) ties the two
   sections together instead of one being vivid brand color and the next
   being generic Bootstrap gray. */
.niva-action-grid.row {
  margin-right: -0.5rem;
  margin-left: -0.5rem;
}
.niva-action-grid > div {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
}
body #main-body .niva-action-grid a {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  box-shadow: 0 4px 12px rgba(8, 17, 27, 0.03);
  transition: transform 0.3s cubic-bezier(.4, 0, .2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.niva-action-grid a:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 12px 24px rgba(8, 17, 27, 0.08);
  transform: translateY(-5px);
}
/* body #main-body prefix matches (and beats) theme.css's own
   ".action-icon-btns a .ico-container" / "...i" rules, which are one class
   more specific than a plain ".niva-action-grid .ico-container" and were
   winning — that's why the icons were rendering at the theme's own huge
   2.6em/3.4em hover size and pale gray color instead of ours. */
body #main-body .niva-action-grid .ico-container {
  width: 3.125rem;
  height: 3.125rem;
  margin: 0 auto 0.75rem;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem !important;
  line-height: 1;
  transition: transform 0.3s ease;
}
body #main-body .niva-action-grid .ico-container i {
  color: #08111b !important;
}
body #main-body .niva-action-grid a:hover .ico-container {
  font-size: 1.25rem !important;
  transform: scale(1.1);
}
.niva-action-title {
  display: block;
  font-weight: 700;
  color: #08111b;
  transition: color 0.3s ease, font-weight 0.3s ease;
}
.niva-action-grid a:hover .niva-action-title {
  color: #000;
  font-weight: 700;
}
.niva-action-desc {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--black-30);
  line-height: 1.6;
}

/* Homepage "محصولات و خدمات نیوا هاست" product-group cards — Bootstrap's own
   .card-columns is a CSS multi-column (Pinterest/masonry) layout, which is
   exactly why the middle/right cards never lined up: multi-column never
   equalizes row heights, each column just stacks independently. Switching
   to a real grid (which stretches items by default) plus the same yellow
   icon-badge / hover-lift language as the quick-links grid above ties the
   whole homepage together instead of this section being the odd one out. */
body #main-body .niva-product-grid.card-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  -moz-column-count: initial;
  column-count: initial;
}
.niva-product-card {
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(8, 17, 27, 0.03);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
}
/* theme.css's ".card-columns .card" rule (specificity 0,2,0) beats the plain
   ".niva-product-card" rule above and forces display:inline-block, which
   stops .card-body from stretching to the card's full (grid-equalized)
   height — the leftover space then collects below the button instead of
   above it, so buttons across a row land at different heights depending on
   how many lines the description text wraps to. */
.niva-product-grid.card-columns .niva-product-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.niva-product-card .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.niva-product-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 12px 25px rgba(8, 17, 27, 0.08);
  transform: translateY(-6px);
}
.niva-product-card .ico-container {
  width: 3.125rem;
  height: 3.125rem;
  margin: 0 auto 1rem;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.niva-product-card .ico-container i {
  color: #08111b;
}
/* Fixed 2-line height (not just margin) so a one-line title ("هاست
   وردپرس") and a two-line one ("پشتیبانی وردپرس و ووکامرس") both push the
   description/button down by the same amount — otherwise the buttons drift
   up or down relative to each other across a row even though each card's
   own internal spacing looks fine in isolation. */
.niva-product-card .card-title {
  min-height: 3.25rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.niva-product-card p {
  color: var(--black-30);
  font-size: 0.875rem;
  flex: 1;
}
.niva-product-cta {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.625rem 1.5rem;
  background: #08111b;
  color: var(--primary);
  border-radius: 0.625rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  outline: none;
  box-shadow: none;
}
/* The OS/browser's native focus ring renders in the accent color (often a
   pale yellow halo on this brand's Windows theme), which read as the button
   "fading out" the instant it was clicked/hovered. Replace it with our own
   crisp, solid indicator instead of leaving the default outline to blend
   with the button's own yellow. */
.niva-product-cta:focus-visible {
  outline: 2px solid #08111b;
  outline-offset: 2px;
}
/* #main-body's own "a:hover { color: #B8860B }" rule (line 44) is
   ID-scoped, so its specificity beats any of the class selectors below no
   matter what color we set here — that dull goldenrod, not our intended
   dark navy, was what actually rendered on hover. Prefixing with
   "#main-body" matches that specificity so our color wins instead. */
#main-body .niva-product-card:hover .niva-product-cta,
#main-body .niva-product-cta:hover,
#main-body .niva-product-cta:focus {
  background: var(--primary);
  color: #08111b;
}

/* Custom-styled checkbox (".niva-checkbox", originally the login page's
   "remember me" box, in niva-login.css) — moved here, same reasoning as the
   custom-select block right below: so any checkbox on the site can reuse
   it instead of falling back to the plain native browser box (e.g. the
   account-details "انواع ایمیل" list). */
.niva-checkbox {
  position: relative;
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
.niva-checkbox input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.niva-checkbox-box {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  border: 1.5px solid var(--black-90);
  background: #fff;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}
.niva-checkbox-icon {
  color: #08111b;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.niva-checkbox input:checked ~ .niva-checkbox-box {
  background: var(--primary);
  border-color: var(--primary);
}
.niva-checkbox input:checked ~ .niva-checkbox-box .niva-checkbox-icon {
  opacity: 1;
  transform: scale(1);
}
.niva-checkbox input:focus-visible ~ .niva-checkbox-box {
  box-shadow: 0 0 0 3px rgba(254, 198, 0, 0.35);
}
.niva-checkbox:active .niva-checkbox-box {
  transform: scale(0.88);
}
.niva-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}

/* Custom-styled <select> replacement (site-wide, via niva-select-enhance.js)
   — real border-radius, brand colors and a checkmark on the selected row,
   none of which a native OS dropdown popup can ever be made to render. This
   was previously only loaded on the register page (niva-login.css); moved
   here so every plain <select> on the site gets it, not just that one page. */
/* The wrapper div our own JS creates around the native <select> had no
   explicit width, so it only reliably filled its container in contexts
   that happen to force block children to 100% (like the flex domains-row).
   In a plain inline context — e.g. the "use the domain already in your
   cart" choice, which nests the select inside a <label> — it shrank to
   content width instead, so both the trigger and (since the dropdown list
   is sized left:0/right:0 against this same wrapper) the open dropdown
   ended up too narrow. */
.niva-custom-select {
  position: relative;
  width: 100%;
}
.niva-custom-select-native {
  display: none !important;
}
.niva-custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  border: 1px solid var(--black-90);
  border-radius: .625rem;
  padding: .75rem .875rem;
  background: transparent;
  font-family: inherit;
  font-size: .9375rem;
  color: #08111b;
  text-align: right;
  cursor: pointer;
  transition: border-color .15s ease;
}
.niva-custom-select-trigger:focus {
  outline: none;
}
.niva-custom-select.is-open .niva-custom-select-trigger {
  border-color: var(--primary);
}
.niva-custom-select-trigger svg {
  flex-shrink: 0;
  color: var(--black-50);
  transition: transform .15s ease;
}
.niva-custom-select.is-open .niva-custom-select-trigger svg {
  transform: rotate(180deg);
}
.niva-custom-select-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + .5rem);
  right: 0;
  left: 0;
  margin: 0;
  padding: .375rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--black-90);
  border-radius: .625rem;
  box-shadow: 0 12px 30px -10px rgba(8, 17, 27, .25);
  max-height: 14rem;
  overflow-y: auto;
}
.niva-custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .625rem .75rem;
  border-radius: .5rem;
  font-size: .9375rem;
  color: #08111b;
  cursor: pointer;
}
.niva-custom-select-option:hover {
  background: var(--primary-90, #fef6d9);
}
.niva-custom-select-option.is-selected {
  background: var(--primary);
  font-weight: 700;
}
.niva-custom-select-check {
  flex-shrink: 0;
  opacity: 0;
}
.niva-custom-select-option.is-selected .niva-custom-select-check {
  opacity: 1;
}

/* iCheck's own "square-blue" skin only ever sets margin-right (theme.css:
   ".iradio_square-blue { margin-right: 6px }"), written assuming LTR flow
   where that's the gap between the circle and the label text that follows
   it. This site is RTL, where the text instead sits on the circle's LEFT —
   so that margin lands on the wrong side and the two end up touching.
   Margin on both sides sidesteps the LTR/RTL direction entirely. */
.iradio_square-blue,
.icheckbox_square-blue {
  margin: 0 8px !important;
}

/* Checkbox skin repaint (square-blue's own CSS is a sprite image with a
   grayscale filter hack to fake "not blue"). A plain no-icheck + native
   restyle was tried first, but the addon cards' own click handler calls
   the jQuery .iCheck('check'/'uncheck') plugin method directly, and listens
   for iCheck's "ifChecked"/"ifUnchecked" custom events to flag the addon as
   selected and recalc totals (templates/orderforms/nivahost_cart/js/
   scripts.js, registerAddonEvents()) — none of that fires on a plain
   checkbox with no-icheck, so the box looked checked but the addon never
   actually got added, and clicks got out of sync with the real state.
   Leaving iCheck initialized and only repainting its own generated markup
   keeps that logic working while still matching the brand. */
.icheckbox_square-blue {
  background-image: none !important;
  background-color: #fff !important;
  border: 1.5px solid var(--black-90) !important;
  border-radius: 0.375rem !important;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.icheckbox_square-blue.hover {
  border-color: var(--primary) !important;
  filter: none !important;
}
.icheckbox_square-blue.checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  filter: none !important;
}
.icheckbox_square-blue.checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.3L5.5 10.3L11.5 3.7' fill='none' stroke='%2308111b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Every step of the cart flow (product list, domain selection, configure,
   checkout, etc.) shares the same "font-size-36" utility class for its page
   title — a flat 36px is too large for a plain page heading here. Scoped to
   the cart flow only, since the class name is generic. #main-body adds a
   second ID to beat the cart theme's own all.min.css, which — as with the
   sidebar rules above — loads after this file. */
#main-body #order-standard_cart .font-size-36 {
  font-size: 1.75rem;
}

/* Domain-name row on the "configure domain" step (registersld text input +
   registertld TLD select + the "www." addon): three separate pieces each
   using its own default styling (Bootstrap's plain grey input-group addon,
   a bare .form-control, our own fully-rounded custom-select) with no shared
   border, height or radius between them. Treating the whole row as one
   bordered pill — each piece stripped of its own border/radius and only
   divided by a hairline — makes it read as a single field like everywhere
   else on the site. */
/* No overflow:hidden here (unlike the other merged-pill patterns in this
   file) — the TLD field's dropdown list is absolutely positioned and
   extends below this row, and an overflow:hidden ancestor clips absolutely
   positioned descendants too, not just static ones, so it hid the options
   entirely. Instead, only the two pieces that actually sit at the row's
   outer edges (the "www." addon and the TLD trigger/input) get the row's
   own corner radius directly, via logical (direction-aware) properties;
   the piece in between never touches an outer corner either way. */
#main-body #order-standard_cart .domains-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  border: 1px solid var(--black-90);
  border-radius: 0.625rem;
  background: #fff;
}
/* Bootstrap's col-9/col-3 are fixed-percentage widths that don't shrink on
   their own — with the "." divider added as a third flex item, the row's
   contents added up to more than 100% and wrapped onto a second line. */
#main-body #order-standard_cart .domains-row > [class*="col-"] {
  padding: 0;
  flex-shrink: 1;
  min-width: 0;
}
#main-body #order-standard_cart .domains-row .niva-domain-dot {
  flex-shrink: 0;
}
#main-body #order-standard_cart .domains-row .input-group {
  height: 100%;
  min-width: 0;
}
#main-body #order-standard_cart .domains-row .input-group input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
/* Same failure mode already fixed for ".domain-checker-bg .input-group-box"
   below: the site-wide "#order-standard_cart .form-control { width: 100% }"
   rule made the "www." input claim the whole input-group's width on its
   own, leaving no room for the "www." addon beside it — Bootstrap 4's
   ".input-group" is "flex-wrap: wrap" by default, so instead of the addon
   getting squeezed, the input just wrapped onto its own line below it. */
#main-body #order-standard_cart .domains-row .input-group {
  flex-wrap: nowrap;
}
#main-body #order-standard_cart .domains-row .input-group-text {
  height: 100%;
  display: flex;
  align-items: center;
  background: var(--black-95, #f5f5f5);
  border: none;
  border-inline-start: 1px solid var(--black-90);
  border-radius: 0;
  border-start-start-radius: 0.625rem;
  border-end-start-radius: 0.625rem;
  color: var(--black-30);
  font-size: 0.875rem;
  padding: 0 0.875rem;
}
#main-body #order-standard_cart .domains-row #registersld,
#main-body #order-standard_cart .domains-row #transfersld,
#main-body #order-standard_cart .domains-row #owndomainsld {
  height: 2.75rem;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
/* The "example" / "com" pair (used when the customer types their own
   already-owned domain) had no visual separator at all between the name
   and the extension — nothing told the user the second box was a distinct
   TLD field rather than a continuation of the name. A literal "." between
   them reads immediately as "example.com". */
#main-body #order-standard_cart .domains-row .niva-domain-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 0.5rem;
  border-inline-start: 1px solid var(--black-90);
  color: var(--black-50);
  font-weight: 700;
  background: var(--black-95, #f5f5f5);
}
#main-body #order-standard_cart .domains-row > [class*="col-"]:last-child #owndomaintld {
  height: 2.75rem;
  border: none;
  border-radius: 0;
  border-start-end-radius: 0.625rem;
  border-end-end-radius: 0.625rem;
  box-shadow: none;
}
#main-body #order-standard_cart .domains-row .niva-custom-select {
  height: 100%;
}
#main-body #order-standard_cart .domains-row .niva-custom-select-trigger {
  height: 2.75rem;
  border: none;
  border-inline-start: 1px solid var(--black-90);
  border-radius: 0;
  border-start-end-radius: 0.625rem;
  border-end-end-radius: 0.625rem;
}

/* Featured/spotlight TLD cards on the domain-search results (each a fixed
   112px-tall box) — the "available" state (price line + button) and the
   "unavailable"/"invalid" state (button only, with its own 32px top margin
   to visually compensate for the missing price line) never actually land
   on the same button position, since that compensation is a guess rather
   than being pinned to the card. Absolutely positioning the whole result
   block to the same spot regardless of which state is showing fixes that,
   and normalizing everyone to the exact same button style. */
.spotlight-tld {
  height: auto;
  min-height: 130px;
  padding: 15px 6px 60px;
}
.spotlight-tld .domain-lookup-result {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
}
.spotlight-tld .btn.unavailable,
.spotlight-tld .btn.invalid,
.spotlight-tld .domain-contact-support {
  margin: 0;
}
/* This file's own ".spotlight-tld .btn:not(.domain-contact-support)" rule
   (all.css) sized these buttons for the original short English labels
   ("Add" / "Unavailable") — width:85% plus text-overflow:ellipsis, which
   just clips the longer Persian replacements ("ثبت دامنه" / "ناموجود")
   instead of showing them. Widening the box and dropping the ellipsis
   clipping lets the full word show. */
#spotlightTlds .spotlight-tld .btn:not(.domain-contact-support) {
  width: 96%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  background-color: #1a8454;
  border-color: #156c44;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.3;
  padding: 4px 6px;
}
#spotlightTlds .spotlight-tld .btn.unavailable,
#spotlightTlds .spotlight-tld .btn.invalid {
  background-color: #eee;
  border-color: #ddd;
  color: #999;
}
/* The TLD extension ("com", "ir", …) rendered at ~90% of the card's own
   font-size with no separation from the price below it, and — since this
   page is RTL — a leading-dot string like ".com" gets its "." reordered to
   the visual end by the bidi algorithm, showing as "com." instead. Forcing
   the fragment to render as an isolated LTR run (dir="ltr" in the markup,
   unicode-bidi:isolate here) fixes the dot; lowercasing in the template
   handles the inconsistent-case registrar data ("Info" vs "com"). */
.spotlight-tld .niva-spotlight-ext {
  display: block;
  unicode-bidi: isolate;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #08111b;
  margin-bottom: 0.375rem;
}
.spotlight-tld .available.price {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #08111b;
}
/* Brand-yellow / brand-black ribbon pair instead of the stock red/olive,
   which clashed with everything else on the page. */
.spotlight-tld-hot {
  background-color: var(--primary) !important;
  color: #08111b !important;
}
.spotlight-tld-sale {
  background-color: #08111b !important;
  color: var(--primary) !important;
}

/* ==========================================================================
   Store / cart product listing (templates/orderforms/nivahost_cart) — the
   same card language as the homepage's product grid (rounded card, yellow
   icon accents, dark-navy-to-yellow CTA), adapted for a full pricing card
   with a feature list. Forked from WHMCS's stock "standard_cart" theme,
   which shipped with no card styling at all (bare text in two Bootstrap
   columns) — see templates/orderforms/nivahost_cart/products.tpl.
   ========================================================================== */
.niva-plan-header p {
  color: var(--black-30);
}
.niva-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
/* theme.css ships its own "body #order-standard_cart .products .product"
   rule (specificity 1 ID + 2 classes + 1 element) for this exact page,
   which otherwise wins over a plain ".niva-plan-card" and zeroes the
   border/radius/shadow back out — matching that chain (plus #main-body)
   to beat it outright rather than tie on source order. */
body #main-body #order-standard_cart .products .niva-plan-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(8, 17, 27, 0.03);
  overflow: hidden;
  padding: 0;
  margin: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
body #main-body #order-standard_cart .products .niva-plan-card:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 25px rgba(8, 17, 27, 0.08);
  transform: translateY(-4px);
}
/* theme.css's own "...cart-body .products .product header" rule (1 ID + 3
   classes + 2 elements) beats a plain ".niva-plan-card-header" outright —
   !important is simplest here rather than chasing another selector chain. */
.niva-plan-card-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem !important;
  border-bottom: 1px solid var(--black-95, #f0f0f0) !important;
  margin: 0 !important;
  background: #fff !important;
}
.niva-plan-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #08111b;
}
.niva-plan-qty {
  font-size: 0.75rem;
  font-weight: 700;
  color: #08111b;
  background: var(--primary);
  border-radius: 999px;
  padding: 0.1875rem 0.625rem;
  white-space: nowrap;
}
.niva-plan-desc {
  padding: 1.25rem 1.5rem 0;
  flex: 1;
}
.niva-plan-desc > p {
  color: var(--black-30);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.niva-plan-features {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.niva-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #08111b;
  border-bottom: 1px dashed var(--black-95, #f0f0f0);
}
.niva-plan-features li:last-child {
  border-bottom: none;
}
.niva-plan-feature-check {
  flex-shrink: 0;
  margin-top: 0.1875rem;
  color: var(--primary);
}
.niva-plan-feature-value {
  font-weight: 700;
}
.niva-plan-footer {
  margin: auto 0 0 !important;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.875rem;
}
.niva-plan-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.4;
}
.niva-plan-price-label {
  font-size: 0.75rem;
  color: var(--black-30);
}
.niva-plan-price-amount {
  font-size: 1.875rem;
  font-weight: 700;
  color: #08111b;
}
.niva-plan-price-cycle {
  font-size: 0.8125rem;
  color: var(--black-30);
}
.niva-plan-setup-fee {
  display: block;
  font-size: 0.6875rem;
  color: var(--black-30);
}
/* theme.css also ships "body #order-standard_cart .products .product
   footer .btn-order-now" (1 ID + 3 classes + 2 elements) for this same
   button — needs matching (plus #main-body) to actually win. */
body #main-body #order-standard_cart .products .niva-plan-card footer .niva-plan-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  background: #08111b;
  color: var(--primary);
  border: none;
  border-radius: 0.625rem;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
body #main-body #order-standard_cart .products .niva-plan-card footer .niva-plan-cta:hover,
body #main-body #order-standard_cart .products .niva-plan-card footer .niva-plan-cta:focus {
  background: var(--primary);
  color: #08111b;
}

/* Addon cards (templates/orderforms/nivahost_cart/addons.tpl) reuse this
   same ".niva-plan-card" layout, but wrap header/desc/footer in a <form>
   (addons submit via POST, not a plain link) — that extra wrapper needs to
   be a flex column filling the card's height too, or ".niva-plan-footer"'s
   "margin-top:auto" trick has nothing to push against and the button sits
   right under the description instead of at the card's bottom edge. */
.niva-plan-card form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.niva-plan-card .niva-plan-desc .form-group {
  margin-bottom: 0;
}
.niva-plan-card .niva-plan-desc select.form-control {
  border-radius: 0.625rem;
}

/* "Featured" plans (WHMCS's native per-product "Featured" checkbox) — same
   red used for the marketing site's own "پرفروش" nav badge, so the two
   sites agree on what "best seller" looks like. The card itself gets a red
   accent border instead of our usual yellow-on-hover, so it reads as
   distinct even before you notice the badge. */
body #main-body #order-standard_cart .products .niva-plan-card.niva-plan-card-featured {
  position: relative;
  border-color: #df1f1f;
  box-shadow: 0 8px 20px rgba(223, 31, 31, 0.1);
}
body #main-body #order-standard_cart .products .niva-plan-card.niva-plan-card-featured:hover {
  border-color: #df1f1f;
  box-shadow: 0 14px 28px rgba(223, 31, 31, 0.16);
}
/* The card has overflow:hidden (so the header's square corners get clipped
   to the card's own border-radius) — a badge positioned above the top edge
   (negative top) was being clipped by that same rule and never visible.
   Sitting it just inside the top edge instead keeps it in-bounds. */
.niva-plan-badge {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 1.25rem;
  background: #df1f1f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(223, 31, 31, 0.35);
  z-index: 1;
}

/* Sidebar category menu (same page) — plain Bootstrap list-group by
   default; restyled to match the site's own nav/link spacing and font
   instead of the generic theme look. */
/* overflow:hidden so the header's own square corners (it has its own white
   background + bottom border) get clipped to this card's rounded corners
   instead of poking out past them as small square fragments at the top. */
.cart-sidebar .card-sidebar {
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 1rem;
  box-shadow: none;
  overflow: hidden;
}
.cart-sidebar .card-header {
  background: #fff;
  border-bottom: 1px solid var(--black-95, #f0f0f0);
  padding: 1rem 1.25rem;
}
.cart-sidebar .panel-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #08111b;
  margin: 0;
}
/* The cart theme's OWN "#order-standard_cart .cart-sidebar .list-group-item"
   rule lives in templates/orderforms/nivahost_cart/css/all.min.css, which
   WHMCS places as the LAST <link> on the page (after this file) — so a
   same-specificity selector here would still lose on source order.
   #main-body adds a second ID to actually beat it, not just tie it. */
#main-body #order-standard_cart .cart-sidebar .list-group-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
  border-radius: 0.625rem;
  margin: 0.3125rem 0.75rem;
  padding: 0.625rem 0.875rem;
  width: auto;
  font-size: 0.875rem;
  line-height: 1.3;
  color: #08111b;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#main-body #order-standard_cart .cart-sidebar .list-group-item:first-child {
  margin-top: 0.75rem;
}
#main-body #order-standard_cart .cart-sidebar .list-group-item:last-child {
  margin-bottom: 0.75rem;
}
.cart-sidebar .list-group-item:hover {
  background: var(--primary-90, #fef6d9);
}
.niva-sidebar-icon {
  flex-shrink: 0;
  width: 1.125rem;
  text-align: center;
  color: var(--black-50);
  font-size: 0.875rem;
}
.cart-sidebar .list-group-item.active .niva-sidebar-icon {
  color: #08111b;
}
/* theme.css ships its own "body #order-standard_cart .cart-sidebar
   .list-group-item.active" rule (1 ID + 3 classes + 1 element) that sets a
   near-invisible var(--bg-lifted) background — this is why the category
   you're currently viewing didn't stand out at all. Matching that exact
   chain to win instead of tying on source order. */
body #order-standard_cart .cart-sidebar .list-group-item.active,
body #order-standard_cart .cart-sidebar .list-group-item.active:hover,
body #order-standard_cart .cart-sidebar .list-group-item.active:focus {
  background-color: var(--primary);
  color: #08111b;
  font-weight: 700;
}

/* ==========================================================================
   Configure-product step (templates/orderforms/nivahost_cart/
   configureproduct.tpl) — same card language as everywhere else: the plan
   name/feature list on the right, the sticky order-summary + billing-cycle
   + addons on the left, none of which had any card framing of their own.
   ========================================================================== */
.product-info .product-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #08111b;
  margin-bottom: 0.5rem;
}
.product-info.niva-plan-desc {
  padding: 0;
}
.product-info .niva-plan-features {
  margin-top: 1rem;
  max-width: 28rem;
}
body #order-standard_cart .sub-heading {
  margin: 2rem 0 2rem;
}
/* The divider itself is a zero-height box whose top border IS the line
   (".sub-heading{height:0;border-top:1px solid}"); the label span is then
   pulled up over it with a hardcoded pixel offset — that only centers the
   badge correctly for ONE specific text height. Some dividers wrap to two
   lines (e.g. "اطلاعات تکمیلی" + the "(فیلدهای مورد نیاز...)" hint line,
   ~55px tall vs. ~36px for a single-line one); a fixed "-18px" pull tuned
   for the short badge left the tall one's bottom edge hanging ~9px past
   the divider's own margin, overlapping the "کد ملی" field right below it.
   "translateY(-50%)" centers on the line regardless of the badge's actual
   height, so this stays correct for both cases with no per-badge tuning. */
body #order-standard_cart .sub-heading span {
  background: var(--black-95, #f5f5f5);
  color: #08111b;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  top: 0;
  transform: translateY(-50%);
}
.field-container .form-group label {
  font-weight: 700;
  font-size: 0.875rem;
  color: #08111b;
}
/* Order summary card (left column). Plain "#orderSummary" (1 ID) lost its
   card framing to "#order-standard_cart .order-summary" in both
   theme.min.css and all.min.css (1 ID + 1 class each — higher specificity),
   which reset background/padding/border-radius back to their stock look.
   Matching that pattern here (2 IDs) wins outright. */
#main-body #order-standard_cart .order-summary {
  background: #fff;
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 1rem;
  padding: 1.5rem;
}
#orderSummary .font-size-30 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #08111b;
  margin-bottom: 1rem;
}
#orderSummary .product-name {
  display: block;
  font-weight: 700;
  color: #08111b;
}
#orderSummary .product-group {
  display: block;
  font-size: 0.8125rem;
  color: var(--black-30);
  margin-bottom: 0.75rem;
}
#orderSummary .summary-container .clearfix {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.875rem;
  color: #08111b;
}
/* Neither span had an explicit flex-grow, so each sized to its own content
   and "justify-content: space-between" was left to distribute whatever
   space remained as a single gap — which should still flush the last item
   to the true edge in theory, but in practice (RTL + gap + mixed-script
   price text) it visibly didn't: each row's price ended up a different
   distance from the edge instead of lining up in one column. Making the
   label the one flexible item removes the ambiguity entirely: it always
   expands to fill exactly "row width minus price width", so the price
   necessarily lands at the same edge every time, driven by simple
   arithmetic instead of the browser's gap/justify-content interaction. */
#orderSummary .summary-container .clearfix .pull-left {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
#orderSummary .summary-container .clearfix .pull-right {
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: left;
}
#orderSummary .summary-totals {
  border-top: 1px dashed var(--black-95, #f0f0f0);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
#orderSummary .total-due-today {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top: 1px solid var(--black-95, #f0f0f0);
  margin-top: 0.75rem;
  padding-top: 1rem;
}
#orderSummary .total-due-today .amt {
  font-size: 1.875rem;
  font-weight: 700;
  color: #08111b;
  order: -1;
}
#orderSummary .total-due-today span:not(.amt) {
  font-size: 0.8125rem;
  color: var(--black-30);
}
#orderSummary .text-center {
  margin-top: 1.25rem;
}
/* Addon cards — the cart theme's own "#order-standard_cart .panel-addon
   ..." rules (all.min.css, 1 ID + 2 classes, loaded last) beat every plain
   ".addon-products ..." rule below outright, which is why none of this
   actually rendered before — matching that same #order-standard_cart (plus
   #main-body for the source-order tiebreak used throughout this file). */
#main-body #order-standard_cart .addon-products .panel-addon {
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 1rem;
  overflow: hidden;
  height: 100%;
  font-size: 0.875rem;
  /* Forces this onto its own GPU-composited layer so the browser snaps its
     border/clip geometry to a whole pixel grid — this card's left edge
     otherwise lands on a fractional pixel (a side effect of the responsive
     Bootstrap column width), which is what produced the jagged, not-quite-
     rounded corner where the border curve and the overflow-clip curve on
     .panel-add met, independent of border color or width. */
  transform: translateZ(0);
}
#main-body #order-standard_cart .addon-products .panel-addon.panel-addon-selected {
  border-color: var(--primary);
}
#main-body #order-standard_cart .addon-products .panel-body {
  padding: 1.25rem;
  border-radius: 0;
}
#main-body #order-standard_cart .addon-products .panel-body label {
  font-weight: 700;
  font-size: 1rem;
  color: #08111b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
/* The stock theme rendered this as a full-width grey bar ("رایگان!"
   stretched across the whole card) — a small centered pill reads as a
   price tag instead of a disabled-looking strip. */
#main-body #order-standard_cart .addon-products .panel-price {
  display: inline-block;
  margin: 0 auto 1rem;
  padding: 0.25rem 1rem;
  background: var(--primary-30, #fed74d);
  color: #08111b;
  font-weight: 700;
  font-size: 0.8125rem;
  border-radius: 999px;
}
#main-body #order-standard_cart .addon-products .panel-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem;
  background: #08111b;
  color: var(--primary);
  font-weight: 700;
  /* The card's own overflow:hidden clips this to the card's rounded corner,
     but the clip-path curve and the border's own curve are anti-aliased as
     two separate operations — at 1px border widths the seam between them
     doesn't quite line up, leaving a hairline mismatch where the (yellow,
     once selected) border meets the black bar. A 2px border absorbs that
     hairline instead of exposing it. */
  border-radius: 0 0 1rem 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#main-body #order-standard_cart .addon-products .panel-add:hover {
  background: var(--primary);
  color: #08111b;
}
/* "Have a question?" style notice boxes (info-text-sm) sat flush against
   whatever was above them with square corners — every other box on the
   site (cards, fields, buttons) uses the same 0.625rem radius, this one
   just never got it. */
#order-standard_cart .info-text-sm {
  margin-top: 1.25rem;
  border-radius: 0.625rem;
}

/* Every "ادامه" step-submit button across the cart flow (configure-domain,
   configure-product, domain options, checkout, order-complete) puts the
   label first and the arrow icon second in the markup — fine in LTR, but
   in this RTL page that put the arrow on the label's LEFT while it reads
   as if it should point further left "ahead" of the text, i.e. sit to the
   text's right. row-reverse flips the visual order without touching every
   template's markup; the icon glyph itself is swapped to "-left" in the
   templates so the arrowhead actually points the direction of travel. */
#order-standard_cart .btn.btn-primary.btn-lg,
#order-standard_cart .btn.btn-default,
#order-standard_cart #btnCompleteOrder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 0.5rem;
}
/* These buttons start disabled until a valid domain/option is chosen —
   correct, intentional WHMCS behavior. But Bootstrap's default disabled
   look is just this same yellow at 65% opacity, which reads as "this
   button is broken" rather than "not ready yet". A clearly inactive gray
   makes the state obvious instead of looking like a rendering glitch. */
#order-standard_cart .btn.btn-primary.btn-lg:disabled,
#order-standard_cart .btn.btn-primary.btn-lg.disabled {
  background-color: var(--black-95, #f0f0f0) !important;
  border-color: var(--black-95, #f0f0f0) !important;
  color: var(--black-50, #9a9a9a) !important;
  opacity: 1 !important;
  cursor: not-allowed;
}


/* ==========================================================================
   Review & checkout (templates/orderforms/nivahost_cart/viewcart.tpl) — the
   stock theme styled this with a leftover dark-blue (#058) header/zebra-
   striped rows from a much older Bootstrap theme, totally unrelated to the
   brand. Same "#main-body #order-standard_cart" specificity pattern as
   everywhere else in this file, since all.min.css (1 ID + N classes,
   loaded last) beats plain class selectors and ties on source order.
   ========================================================================== */
#main-body #order-standard_cart .view-cart-items-header {
  margin: 0;
  padding: 0.75rem 1.25rem;
  background: #fff;
  color: var(--black-30);
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid var(--black-95, #f0f0f0);
  border-bottom: none;
  border-radius: 1rem 1rem 0 0;
}
#main-body #order-standard_cart .view-cart-items {
  margin: 0 0 1.5rem;
  border: 1px solid var(--black-95, #f0f0f0);
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  overflow: hidden;
}
#main-body #order-standard_cart .view-cart-items .item {
  margin: 0;
  padding: 1.25rem;
  background: #fff;
  border: none;
  border-bottom: 1px solid var(--black-95, #f0f0f0);
  font-size: 0.875rem;
}
#main-body #order-standard_cart .view-cart-items .item:last-child {
  border-bottom: none;
}
#main-body #order-standard_cart .view-cart-items .item:nth-child(even) {
  background: #fff;
}
#main-body #order-standard_cart .view-cart-items .item-title {
  font-size: 1rem;
  font-weight: 700;
  color: #08111b;
}
#main-body #order-standard_cart .view-cart-items .item-group {
  font-size: 0.8125rem;
  color: var(--black-30);
}
#main-body #order-standard_cart .view-cart-items .item-domain {
  color: #08111b;
  font-weight: 700;
  font-size: 0.8125rem;
}
#main-body #order-standard_cart .view-cart-items .item-price {
  text-align: left;
}
/* The header row's price column used Bootstrap's .text-right utility
   (!important), while the actual price data below it is left-aligned
   (item-price, above) — same column, opposite alignment, so the "هزینه/دوره"
   label and the numbers under it landed nowhere near each other. Align the
   header to match the data it labels. */
#main-body #order-standard_cart .view-cart-items-header .text-right {
  text-align: left !important;
}
#main-body #order-standard_cart .view-cart-items .col-sm-1 {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* The price column's own inner width (col width minus its 18px/side
   gutter padding) leaves the amount barely ~4px of slack at 1rem/700 —
   fine for a typical total but a 7-8 digit one ("14,664,000 تومان", e.g.
   a high-config annual plan) tips over that margin and force-wraps mid
   line, which then pushes "سالانه" down and makes the whole row look
   broken. Trimming the column's own gutter and the amount's font-size
   slightly buys enough room for larger totals to still fit on one line. */
#main-body #order-standard_cart .view-cart-items .item-price {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
#main-body #order-standard_cart .view-cart-items .item-price span {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #08111b;
  white-space: nowrap;
}
#main-body #order-standard_cart .view-cart-items .item-price .cycle {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--black-30);
}
#main-body #order-standard_cart .item-title .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  color: var(--black-30);
  font-size: 0.75rem;
  text-decoration: none;
}
#main-body #order-standard_cart .item-title .btn-link:hover {
  color: #08111b;
}
#main-body #order-standard_cart .btn-remove-from-cart {
  color: var(--black-50);
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#main-body #order-standard_cart .btn-remove-from-cart:hover {
  background: #fdecec;
  color: #c0392b;
  text-decoration: none;
}
#main-body #order-standard_cart .empty-cart {
  text-align: right;
  margin: -1.5rem 0.5rem 0 0;
  line-height: 1;
}
#main-body #order-standard_cart .empty-cart .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: none;
  color: var(--black-30);
  font-size: 0.8125rem;
}
#main-body #order-standard_cart .empty-cart .btn:hover {
  color: #c0392b;
}
/* Checkout / continue-shopping CTA block */
#main-body #order-standard_cart .btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  background: #08111b;
  border-color: #08111b;
  color: var(--primary);
  font-weight: 700;
  border-radius: 0.625rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#main-body #order-standard_cart .btn-checkout:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #08111b;
}
#main-body #order-standard_cart .text-right {
  text-align: center;
}
/* "ادامه به خرید دادن" was a bare text link floating under the checkout
   button with no visual weight at all — turning it into a real secondary
   button (same width/padding as the checkout CTA above it, white instead
   of filled) gives it equal footing as an actual second choice rather
   than an afterthought. */
#main-body #order-standard_cart .order-summary .btn-continue-shopping {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.875rem;
  background: #fff;
  border: 1px solid var(--black-90);
  border-radius: 0.625rem;
  color: #08111b;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
#main-body #order-standard_cart .order-summary .btn-continue-shopping:hover {
  background: var(--black-98, #fafafa);
  border-color: #08111b;
  color: #08111b;
}
/* The domain-search hero on cart.php?a=add&domain=register (".domain-
   checker-bg") centers its search box/captcha column with Bootstrap's
   "offset-2" utility (margin-left in LTR) — under this RTL page that
   margin landed on the same physical side either way instead of flipping,
   so the whole column was pushed flush against one edge with all the
   leftover space piled on the other, instead of being centered. Forcing
   auto margins on both sides overrides whichever direction the offset
   class actually resolved to. */
#order-standard_cart .domain-checker-bg .col-md-8 {
  margin-left: auto !important;
  margin-right: auto !important;
  float: none;
}
/* Match the homepage's domain-search look (input + a compact yellow button
   embedded in the same rounded, bordered pill) instead of the stock
   Bootstrap input-group, which stacked into two separate full-width rows
   here: our own site-wide ".form-control{width:100%}" rule (needed
   elsewhere for plain fields) made the input claim the box's entire width
   on its own, leaving no room for the button beside it and forcing a wrap. */
#main-body #order-standard_cart .domain-checker-bg .input-group-box {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--black-90);
  border-radius: 0.75rem;
  overflow: hidden;
  flex-wrap: nowrap;
  padding: 0;
}
#main-body #order-standard_cart .domain-checker-bg .input-group-box .form-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
}
#main-body #order-standard_cart .domain-checker-bg .input-group-box .form-control:focus {
  border: none;
}
#main-body #order-standard_cart .domain-checker-bg .input-group-box .input-group-btn {
  flex: 0 0 auto !important;
  display: flex;
  align-items: center;
  padding: 0.375rem;
  width: auto !important;
}
#main-body #order-standard_cart .domain-checker-bg .input-group-box #btnCheckAvailability {
  flex: 0 0 auto !important;
  background: var(--primary);
  border-color: var(--primary);
  color: #08111b;
  font-weight: 700;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem !important;
  white-space: nowrap;
  width: auto !important;
}
#main-body #order-standard_cart .domain-checker-bg .input-group-box #btnCheckAvailability:hover {
  background: #08111b;
  border-color: #08111b;
  color: var(--primary);
}
#main-body #order-standard_cart .order-summary .subtotal,
#main-body #order-standard_cart .order-summary .bordered-totals,
#main-body #order-standard_cart .order-summary .recurring-totals {
  border-bottom: 1px dashed var(--black-95, #f0f0f0);
  padding: 0.5rem 0;
  margin: 0;
  font-size: 0.875rem;
  color: #08111b;
}
#main-body #order-standard_cart .order-summary .recurring-charges {
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--black-30);
}
/* Promo-code / tax tabs */
#main-body #order-standard_cart .view-cart-tabs .nav-tabs {
  padding: 0;
  border-bottom: 1px solid var(--black-95, #f0f0f0);
  font-size: 0.8125rem;
}
#main-body #order-standard_cart .view-cart-tabs .nav-link {
  border: none;
  color: var(--black-30);
  padding: 0.625rem 1rem;
}
#main-body #order-standard_cart .view-cart-tabs .nav-tabs a[aria-selected="true"],
#main-body #order-standard_cart .view-cart-tabs .nav-tabs a[aria-expanded="true"] {
  background: transparent;
  color: #08111b;
  font-weight: 700;
  border-bottom: 2px solid var(--primary);
}
#main-body #order-standard_cart .view-cart-tabs .tab-content {
  background: var(--black-98, #fafafa);
  padding: 1rem;
  border-radius: 0 0 0.625rem 0.625rem;
}
/* Baseline box for every text field across the whole cart flow (checkout's
   personal-info/address/password fields, the promo box, customfields, the
   notes textarea, etc). theme.min.css has a higher-specificity rule for
   ".field" ("body #order-standard_cart .field") that SHOULD have out-ranked
   this, but its border shorthand references "var(--border-muted)" — a
   token that was never defined anywhere in this theme — so the whole
   shorthand is invalid at compute time and the field silently rendered
   with no border at all (border-style effectively "none"), while a plain
   ".form-control" without the "field" class happened to still pick up a
   real border from a different stylesheet. Declaring the border explicitly
   here, at higher specificity than both, makes every field consistent
   regardless of which stock rule would otherwise have "won". */
#main-body #order-standard_cart .field,
#main-body #order-standard_cart .form-control {
  width: 100%;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--black-90);
  border-radius: 0.625rem;
  background: #fff;
  color: #08111b;
}
#main-body #order-standard_cart .field:focus,
#main-body #order-standard_cart .form-control:focus {
  border-color: var(--primary);
}
#main-body #order-standard_cart .prepend-icon .field,
#main-body #order-standard_cart .prepend-icon .form-control {
  /* The .field-icon label is positioned "right: 0" (flipped for RTL), but
     the stock padding-left/right pair it ships with was written for the
     LTR original (icon on the left, padding-left cleared it) and never got
     mirrored — so the icon sat on the right while the roomy padding stayed
     on the left, and typed/placeholder text ran straight under the icon.
     Swap which side carries the clearance to match where the icon actually is. */
  padding: 0.375rem 2.75rem 0.375rem 0.75rem;
}
#main-body #order-standard_cart .prepend-icon .field:focus {
  border-color: var(--primary);
}
/* The stock ".field-icon" is a fixed 36px/line-height:36px box pinned to
   "top:0", sized to match the ~36px height of a plain text input. The
   custom-select trigger below is taller (0.75rem top/bottom padding vs.
   0.375rem), so that fixed 36px box only covers its top portion and the
   icon renders stuck near the top instead of centered. Stretching the box
   the field's full height and flex-centering the icon inside it works for
   any field height, so it's correct for both this trigger and plain inputs. */
#main-body #order-standard_cart .prepend-icon .field-icon {
  top: 0;
  bottom: 0;
  height: 100%;
  line-height: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Country <select> fields get progressively enhanced into a custom dropdown
   by niva-select-enhance.js (a separate ".niva-custom-select-trigger" div
   that visually replaces the native <select>) — the icon-clearance padding
   above only reaches the now-hidden native select, not this trigger, so the
   globe icon sat directly on top of the selected country's text. */
#main-body #order-standard_cart .prepend-icon .niva-custom-select-trigger {
  padding-right: 2.75rem;
}
/* Checkout's phone field (intl-tel-input plugin — the flag + dial-code box
   prefixed to the number). Ships LTR-only and its flag/dial-code box relies
   on the plugin's own table/absolute-position layout tuned for that — under
   this page's RTL flip that math didn't hold, so the flag icon and "+98"
   text landed on top of each other. Rebuilding that inner box as a plain
   flex row sidesteps the plugin's fragile layout entirely, and a single
   generous input padding (rather than trying to match each iti-sdc-N
   variant's own exact width) guarantees no overlap regardless of dial-code
   digit count. The input itself also had "dir: ltr" (correct — phone
   numbers are typed/read LTR) but that also flipped its text-align to
   left, which pushed the "شماره تلفن" placeholder to the visual left
   instead of the page's normal right-aligned start. */
#main-body #order-standard_cart .intl-tel-input .flag-container,
#main-body .intl-tel-input .flag-container {
  right: 0;
  left: auto;
  /* Stock CSS only ever put z-index on ".selected-flag" (position:relative,
     z-index:1) to lift it above the input; switching that to a plain flex
     row below (position:static) meant z-index no longer applied to it at
     all, so the whole flag/dial-code box silently painted underneath the
     input's own white background instead of on top of it. Put the stacking
     back on ".flag-container" itself, which is still position:absolute. */
  z-index: 2;
}
#main-body #order-standard_cart .intl-tel-input .selected-flag,
#main-body .intl-tel-input .selected-flag {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  width: auto;
  height: 100%;
  padding: 0 0.75rem;
}
#main-body #order-standard_cart .intl-tel-input .iti-flag,
#main-body .intl-tel-input .iti-flag {
  position: static;
  margin: 0;
}
#main-body #order-standard_cart .intl-tel-input .selected-flag .iti-arrow,
#main-body .intl-tel-input .selected-flag .iti-arrow {
  position: static;
  margin: 0;
  border-left-width: 3px;
  border-right-width: 3px;
}
#main-body #order-standard_cart .intl-tel-input.separate-dial-code .selected-dial-code,
#main-body .intl-tel-input.separate-dial-code .selected-dial-code {
  display: inline-block;
  padding: 0;
}
#main-body #order-standard_cart .intl-tel-input.separate-dial-code input,
#main-body #order-standard_cart .intl-tel-input.allow-dropdown input,
#main-body .intl-tel-input.separate-dial-code input,
#main-body .intl-tel-input.allow-dropdown input {
  padding-left: 0.75rem;
  padding-right: 5.5rem;
  text-align: right;
}
/* The country dropdown this plugin opens (flag + English/Persian country
   name + dial code per row) is itself content that only makes sense read
   left-to-right — same reasoning as the phone number field above. Left at
   the page's ambient RTL, the mixed Persian/English/digit text per row
   forced a few extra pixels of bidi reordering that didn't fit the row's
   fixed width, which is what forced the ugly horizontal scrollbar; setting
   the list to plain LTR (its natural reading direction) both fixes the
   fitting and gives every row a predictable flag → name → dial-code order.
   NOTE: this uses the actual classes this plugin's installed version
   renders ("country-list"/"country"/"flag-box"/"country-name"/"dial-code")
   — a newer major version of this same plugin uses "iti__"-prefixed BEM
   class names instead, which don't exist anywhere in this page's markup. */
#main-body #order-standard_cart .intl-tel-input .country-list,
#main-body .intl-tel-input .country-list {
  direction: ltr;
  text-align: left;
  overflow-x: hidden;
  border-radius: 0.625rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--black-90);
}
#main-body #order-standard_cart .intl-tel-input .country-list .country,
#main-body .intl-tel-input .country-list .country {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#main-body #order-standard_cart .intl-tel-input .country-list .flag-box,
#main-body .intl-tel-input .country-list .flag-box {
  margin-right: 0;
  flex: 0 0 auto;
}
#main-body #order-standard_cart .intl-tel-input .country-list .country-name,
#main-body .intl-tel-input .country-list .country-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #08111b;
}
#main-body #order-standard_cart .intl-tel-input .country-list .dial-code,
#main-body .intl-tel-input .country-list .dial-code {
  margin-left: auto;
  color: var(--black-30);
  font-weight: 700;
}
/* Checkout's captcha (#default-captcha-domainchecker, from includes/
   captcha.tpl) is a single flex row with THREE items: the label <p>, the
   code image (.col-6), and the input (.col-6) — label(119px) + image
   (294px) left only 175px for the input's own 294px column, so it wrapped
   to its own line under the image instead of sitting beside it. Giving the
   label its own full-width line first frees the row for image+input to sit
   side by side on the next line; "order" then puts the field on the right
   (order:1, so it comes first in this RTL row) and the code image on the
   left (order:2), per how a label+field pair reads on every other field. */
#order-standard_cart #default-captcha-domainchecker {
  flex-wrap: wrap;
}
#order-standard_cart #default-captcha-domainchecker > p {
  flex: 1 0 100%;
}
#order-standard_cart #default-captcha-domainchecker .captchaimage {
  order: 2;
}
#order-standard_cart #default-captcha-domainchecker .col-6:last-child {
  order: 1;
}
/* Secondary buttons (promo-code submit, tax "update totals", modal "خیر")
   inherited plain white/gray Bootstrap .btn-default with no brand color at
   all. Same outline treatment used for other secondary actions site-wide. */
#order-standard_cart .btn.btn-default {
  background: #fff;
  border: 1.5px solid #08111b;
  color: #08111b;
  font-weight: 700;
  border-radius: 0.625rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#order-standard_cart .btn.btn-default:hover {
  background: #08111b !important;
  color: var(--primary) !important;
}
/* The promo-code "اعمال کد" submit is the one actionable button in that
   tab (not a cancel/secondary action like the modal's "خیر"), so it gets
   the same solid CTA treatment as the checkout button instead of the
   outline used for secondary actions — an empty outlined button here read
   as unclear/not obviously clickable. */
#order-standard_cart button[name="validatepromo"] {
  background: #08111b;
  border-color: #08111b;
  color: var(--primary);
}
#order-standard_cart button[name="validatepromo"]:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #08111b;
}

/* The configure-product two-column split (65% config / 35% order-summary,
   narrowing to 31% for the summary at medium widths) left the summary card
   too tight for its own text — long configurable-option labels ("پردازنده:
   1 هسته اختصاصی...") had no room and got ellipsis-clipped, while the
   config side sat with unused whitespace on wide screens. Handing width
   from the config side to the summary side fixes both at once. */
@media only screen and (min-width: 1200px) {
  #main-body #order-standard_cart .secondary-cart-body {
    width: 58%;
  }
  #main-body #order-standard_cart .secondary-cart-sidebar {
    width: 42%;
  }
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
  #main-body #order-standard_cart .secondary-cart-body {
    width: 62%;
  }
  #main-body #order-standard_cart .secondary-cart-sidebar {
    width: 38%;
  }
}

/* ==========================================================================
   Checkout (templates/orderforms/nivahost_cart/checkout.tpl) — the
   "already registered? / create account" toggle used Bootstrap's stock
   semantic colors (info=teal, warning=orange), neither of which exists
   anywhere else in the brand's yellow/navy palette.
   ========================================================================== */
#order-standard_cart #btnAlreadyRegistered,
#order-standard_cart #btnNewUserSignup {
  background: #08111b;
  border-color: #08111b;
  color: #fff;
  font-weight: 700;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#order-standard_cart #btnAlreadyRegistered:hover,
#order-standard_cart #btnNewUserSignup:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #08111b;
}
/* Google's own sign-in button is rendered by WHMCS's remote-auth module
   inside a cross-origin iframe — its own border-radius/padding can't be
   reached from our CSS. Giving the wrapper around it consistent spacing
   is the part actually in our control. */
#order-standard_cart .social-signin-btns {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}
/* The existing-customer login panel (email/password, or its "ورود با
   پیامک" toggle) had its primary button and secondary link sitting side
   by side inline with no shared width or alignment. Full-width primary
   action, secondary link centered underneath. */
#order-standard_cart #btnExistingLogin,
#order-standard_cart #checkoutSmsSendBtn {
  display: block;
  width: 100%;
}
#order-standard_cart #checkoutSmsToggle,
#order-standard_cart #checkoutSmsBack {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--black-90);
  border-radius: 0.625rem;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
#order-standard_cart #checkoutSmsToggle:hover,
#order-standard_cart #checkoutSmsBack:hover {
  border-color: #08111b;
  color: #08111b;
}
/* The email/password/mobile fields and their buttons ran flush to this
   column's own edges (no breathing room from the vertical divider on one
   side or the page's edge on the other) — a bit of side padding on the
   column itself, rather than shrinking every field/button individually,
   keeps them all the same width relative to each other while adding the
   missing margin. */
#order-standard_cart .auth-col-form {
  padding: 0 1.75rem;
}
/* These two fields are "dir=ltr" (digits should type/read left-to-right),
   which also defaults their text-align to "start" = left — same mismatch
   as the main checkout phone field: placeholder ends up on the left while
   its prepend-icon sits on the right (RTL), disconnected from each other. */
#order-standard_cart #inputCheckoutSmsMobile,
#order-standard_cart #inputCheckoutSmsCode {
  text-align: right;
}
/* Two-column layout: the email/mobile login form on the right, a vertical
   "یا" divider, and the Google button on the left (checkout.tpl wraps
   these three as siblings inside ".auth-two-col"). Row order in the
   markup is form → divider → social, and since this is RTL that puts the
   form on the right and social on the left without needing to reorder
   anything. Collapses to stacked full-width columns on narrow screens,
   where a vertical line makes no sense — the horizontal one there plays
   the same role as the divider elsewhere on this page. */
#order-standard_cart .auth-two-col {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  padding: 0.5rem 0;
}
#order-standard_cart .auth-col {
  flex: 1 1 0;
  min-width: 0;
}
/* The email+password fields used to sit side by side (col-sm-6 + col-sm-6)
   across the full page width — squeezed into this half-width column,
   that's too cramped for two fields per row, so stack them regardless of
   viewport width here specifically. */
#order-standard_cart .auth-col-form .row > [class*="col-"] {
  flex: 0 0 100%;
  max-width: 100%;
}
#order-standard_cart .auth-col-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#order-standard_cart .auth-col-social-title {
  color: var(--black-30);
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}
#order-standard_cart .auth-vertical-divider {
  flex: 0 0 auto;
  position: relative;
  width: 1px;
  background: var(--black-95, #f0f0f0);
}
/* The "یا" badge only had vertical padding (no horizontal), so its white
   background was exactly text-width — just barely wider than the glyph
   strokes, letting the line behind peek through at the edges instead of
   looking like a clean badge sitting on top of it. A fixed-size circle
   guarantees full coverage regardless of glyph shape, and reads as more
   deliberate than a bare word floating on a line. */
#order-standard_cart .auth-vertical-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: #fff;
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 50%;
  color: var(--black-30);
  font-size: 0.8125rem;
}
@media (max-width: 767px) {
  #order-standard_cart .auth-two-col {
    flex-direction: column;
  }
  #order-standard_cart .auth-vertical-divider {
    width: 100%;
    height: 1px;
    margin: 0.5rem 0;
  }
}
/* Validation/error alerts (missing-field errors, promo errors, bundle
   warnings, etc.) had square corners while every other box on this page
   (fields, cards, notices) uses the same 0.625rem radius. Their <ul> of
   error lines also still had the stock "padding-left: 40px" that indents
   list bullets away from the edge in LTR — in RTL that's the wrong side,
   so the padding did nothing and the bullets sat flush against the box's
   actual near edge (the right one) instead of being inset from it. */
#order-standard_cart .alert {
  border-radius: 0.625rem;
}
#order-standard_cart .alert ul {
  padding-left: 0;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Domain registration page (templates/orderforms/nivahost_cart/
   domainregister.tpl) — the TLD pricing table and the two promo cards
   below it ("افزودن هاست اشتراکی" / "دامنه خود را به سیستم ما انتقال
   دهید") were still using 2010s-era stock styling: a blue-bottom-border
   table header, plain row dividers with no card framing, and a
   ".domain-promo-box i{float:right}" rule that in this RTL page floated
   the icon into the exact spot heading text also starts from (RTL text
   starts at the right too), so the icon sat on top of the title instead
   of beside/above it.
   ========================================================================== */
/* The active category filter tab ("badge-success") rendered white text on
   a transparent background — invisible against this white page, so there
   was no way to tell which filter (Popular/Services/Other/etc) was
   currently selected. */
#main-body #order-standard_cart .domain-pricing .tld-filters .badge {
  display: inline-block;
  margin: 0.25rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid var(--black-90);
  border-radius: 999px;
  color: #08111b;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
#main-body #order-standard_cart .domain-pricing .tld-filters .badge:hover {
  border-color: #08111b;
}
#main-body #order-standard_cart .domain-pricing .tld-filters .badge.badge-success {
  background: #08111b;
  border-color: #08111b;
  color: var(--primary);
}
#order-standard_cart .domain-pricing .bg-white {
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 0.625rem;
  overflow: hidden;
}
#order-standard_cart .domain-pricing .tld-pricing-header,
#order-standard_cart .domain-pricing .tld-pricing-header .col-xs-4,
#order-standard_cart .domain-pricing .tld-pricing-header .col-sm-4,
#order-standard_cart .domain-pricing .tld-pricing-header .tld-column {
  background: var(--black-98, #fafafa);
  border: none;
  color: #08111b;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.75rem 0.5rem;
  height: auto;
  border-radius: 0;
}
/* theme.min.css has a higher-specificity reset ("body #order-standard_cart
   .domain-pricing .bg-white .tld-row{border-style:none}", element+ID+3
   classes) that outranks the plain rule above it in the SAME stock
   file and silently killed the row divider — matching its exact
   specificity path (2 IDs) here to win outright regardless. */
/* Same leading-dot bidi reordering fix as the domain-search spotlight
   cards (".niva-spotlight-ext") — ".com" was rendering as "com." here too. */
.niva-ltr-fragment {
  unicode-bidi: isolate;
}
#main-body #order-standard_cart .domain-pricing .bg-white .tld-row {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--black-95, #f0f0f0);
  border-style: solid;
  font-size: 0.875rem;
  color: #08111b;
}
#main-body #order-standard_cart .domain-pricing .bg-white .tld-row:hover {
  background: var(--black-98, #fafafa);
}
#main-body #order-standard_cart .domain-pricing .bg-white .tld-row:last-child {
  border-bottom: none;
}
#order-standard_cart .domain-pricing .tld-row.highlighted {
  background: var(--black-98, #fafafa);
}
#order-standard_cart .domain-pricing .tld-row small {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.75rem;
  color: var(--black-30);
}
#order-standard_cart .domain-pricing .two-row-center {
  border-right: none;
  border-left: 1px solid var(--black-95, #f0f0f0);
}
/* The two cards sit in Bootstrap col-md-6 columns, which already stretch
   to equal height by default (".row{display:flex}") — but the card itself
   only wrapped its own content height, so whichever card had the extra
   footnote line (the transfer one) ended up visibly taller than the other.
   Making the card itself a full-height flex column, with the button
   pushed down by "margin-top:auto" on the row above it, keeps both
   buttons level regardless of which card has more text. */
#order-standard_cart .domain-promo-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}
/* The two cards sit in col-md-6 columns that stack full-width below the
   md breakpoint — with no vertical gutter of their own (Bootstrap's row
   gutter is horizontal-only), the stacked cards ran flush into each
   other with zero gap. */
@media (max-width: 991px) {
  #order-standard_cart .domain-promo-box {
    margin-bottom: 1.25rem;
  }
}
#order-standard_cart .domain-promo-box .btn {
  margin-top: auto;
}
/* Both subtitles read as plain body copy, not a colored callout — the
   stock "text-warning"/"text-primary" classes gave one card yellow text
   (unreadable-ish on white) and the other dark, with no reason for the
   difference. */
#order-standard_cart .domain-promo-box .text-warning,
#order-standard_cart .domain-promo-box .text-primary {
  color: #08111b !important;
}
#order-standard_cart .domain-promo-box .clearfix {
  display: block;
}
#order-standard_cart .domain-promo-box i {
  float: none;
  display: block;
  width: auto;
  font-size: 2rem;
  margin: 0 auto 1rem;
  color: var(--primary);
}
#order-standard_cart .domain-promo-box h3 {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: #08111b;
}
#order-standard_cart .domain-promo-box p {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--black-30);
}
#order-standard_cart .domain-promo-box p.small {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
}

/* ==========================================================================
   Announcements (templates/nivahost/announcements.tpl,
   viewannouncement.tpl) — previously plain default Bootstrap card/list
   styling with no brand identity at all.
   ========================================================================== */
#main-body .announcements {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
#main-body .announcement {
  padding: 1.5rem;
  border: 1px solid var(--black-95, #f0f0f0);
  border-radius: 0.75rem;
  background: #fff;
}
#main-body .announcement h1 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
#main-body .announcement h1 a {
  color: #08111b;
  text-decoration: none;
}
#main-body .announcement h1 a:hover {
  color: var(--primary-30, #08111b);
}
#main-body .announcement .list-inline {
  margin-bottom: 0.75rem;
}
#main-body .announcement .list-inline-item {
  color: var(--black-30);
  font-size: 0.8125rem;
}
#main-body .announcement article {
  color: var(--black-30);
  line-height: 1.9;
  margin-bottom: 1rem;
}
#main-body .announcement .btn-default {
  display: inline-flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 0.375rem;
  background: #08111b;
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.5rem 1.125rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#main-body .announcement .btn-default:hover {
  background: var(--primary) !important;
  color: #08111b !important;
}
#main-body .pagination {
  gap: 0.375rem;
}
#main-body .pagination .page-link {
  border: 1px solid var(--black-90);
  border-radius: 0.5rem;
  color: #08111b;
  margin: 0;
}
/* WHMCS's own pagination generator emits First/Prev with LEFT-pointing
   chevrons and Next/Last with RIGHT-pointing ones — correct for LTR
   (where "back" is leftward), but this page's RTL layout already mirrors
   *positions* automatically (First/Prev render on the physical right,
   Next/Last on the left) while the glyphs themselves stayed pointing the
   original LTR way, so every arrow ended up backwards relative to where
   it actually navigates. Flipping the glyphs (not the layout) corrects
   the direction without touching WHMCS's own pagination HTML. */
#main-body .pagination .fa-chevron-left,
#main-body .pagination .fa-chevron-right,
#main-body .pagination .fa-chevron-double-left,
#main-body .pagination .fa-chevron-double-right {
  display: inline-block;
  transform: scaleX(-1);
}
#main-body .pagination .page-item.active .page-link {
  background: #08111b;
  border-color: #08111b;
  color: var(--primary);
}
#main-body .pagination .page-item.disabled .page-link {
  color: var(--black-50, #9a9a9a);
  background: var(--black-98, #fafafa);
}
/* Sidebar's "بر اساس ماه" (by-month) archive list and support links used
   plain unstyled list-group markup — matching the exact same pill/active
   treatment as the order-form's own "cart-sidebar" (store/product pages)
   so every sidebar in the site reads as one consistent component instead
   of two different styles depending on which page you're on. */
#main-body .card-sidebar {
  border-radius: 0.75rem;
  overflow: hidden;
}
#main-body .card-sidebar .list-group-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
  border-radius: 0.625rem;
  margin: 0.3125rem 0.75rem;
  padding: 0.625rem 0.875rem;
  width: auto;
  color: var(--black-30);
}
/* The rule above's "#main-body .card-sidebar .list-group-item" outranks the
   plain ".w-hidden{display:none}" utility class on specificity, so WHMCS's
   own hidden template rows (e.g. the CC-recipients sidebar's empty-state
   row and its hidden clone-row template) were rendering as visible empty
   rows/stray icons instead of staying hidden. */
#main-body .card-sidebar .list-group-item.w-hidden {
  display: none;
}
/* This page's sidebar links ("Support Tickets" nav, etc.) are actually
   WHMCS's own client-area menu component, not the order-form's simple
   "<i> + text" markup — the icon and label sit inside a nested
   ".sidebar-menu-item-wrapper", so the "gap" above (on ".list-group-item"
   itself) had nothing to space out, since that wrapper is its ONLY direct
   child. The real icon/label pair needs the gap one level down. */
#main-body .card-sidebar .sidebar-menu-item-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
/* theme.min.css's own ".sidebar .sidebar-menu-item-icon-wrapper" carries a
   physical "margin-right: 0.3rem" (LTR-authored: meant to gap the icon
   from the label that follows it). In RTL the icon is the row's
   RIGHTMOST element, so that margin pushes it away from the row's own
   right edge instead of toward the label — the "gap" above already
   spaces icon/label correctly, so this only needs neutralizing. */
#main-body .card-sidebar .sidebar-menu-item-icon-wrapper {
  margin-right: 0;
}

/* Dashboard card-header action buttons ("تمدید کنید" on the
   expiring-domains widget, "سرویس های من" on the active-services widget,
   etc.) use WHMCS's own ".bg-color-midnight-blue" / ".bg-color-gold"
   utilities, which resolve to "var(--grayscale-accented)" /
   "var(--yellow-300)" — both undefined in this theme's token set, so the
   whole background-color declaration is invalid and the buttons fall
   back to plain white, blending into the white card-header. They're also
   wrapped in a physical ".float-right", which in RTL sits on the same
   side the title text itself starts from, crowding it instead of sitting
   clear at the row's other end. Same undefined-token bug also hits
   ".bg-color-red" (the dashboard "صورت حساب های پرداخت نشده" widget's
   "مشاهده همه" button — white-on-white, completely invisible until
   hovered), so it gets the same treatment here. */
#main-body .card-header .btn.bg-color-midnight-blue,
#main-body .card-header .btn.bg-color-gold,
#main-body .card-header .btn.bg-color-blue,
#main-body .card-header .btn.bg-color-red {
  background-color: #08111b;
  border-color: #08111b;
  color: var(--primary);
}
#main-body .card-header .btn.bg-color-midnight-blue:hover,
#main-body .card-header .btn.bg-color-gold:hover,
#main-body .card-header .btn.bg-color-blue:hover,
#main-body .card-header .btn.bg-color-red:hover {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #08111b !important;
}
/* "سرویس های من" uses a physical "fa-arrow-right" (LTR-authored: point
   toward more content). This button now sits at the row's LEFT end and
   reads toward the right, so the arrow needs to point left to match —
   flipped rather than swapped to "fa-arrow-left" so it stays a single
   rule covering any other header button using the same icon. It also
   had no gap at all from the label text. */
#main-body .card-header .btn i.fa-arrow-right {
  transform: scaleX(-1);
  margin-left: 0.375rem;
}
/* Same missing icon/label gap on the other card-header action buttons
   ("+درخواست جدید", "تمدید کنید"'s sync icon, etc.) — icon renders first
   (rightmost) with the label following to its left, so the gap goes on
   the icon's left side. */
#main-body .card-header .btn i.fa-plus,
#main-body .card-header .btn i.fa-sync {
  margin-left: 0.375rem;
}

/* Active-service row status badge ("فعال"): WHMCS sizes the wrapping
   ".div-service-status" via an inline "width" (a JS-computed px value
   meant to match a hidden ".label-placeholder" ghost span) and the
   visible ".label" itself carries "overflow: hidden" — between rounding
   in that JS measurement and this theme's own font/padding, the real
   label needs a hair more room than it's given, clipping "فعال" down to
   "فـ...". Overriding both to size to their actual content removes the
   fragile fixed width entirely instead of trying to out-guess it. */
#main-body .div-service-status {
  width: auto !important;
  min-width: 3rem;
}
#main-body .div-service-status .label:not(.label-placeholder) {
  width: auto !important;
  overflow: visible;
  white-space: nowrap;
  border-radius: 0.375rem;
}
/* "h3.card-title" is "display: flex" (niva-clientarea.css), so "float"
   on its child has NO effect at all — flex items ignore float entirely.
   The action-button wrapper is also the FIRST element in the DOM (before
   the icon/title text), so in this RTL flex row it was rendering at the
   row's true start (the right, same side the title itself starts from),
   squeezing both together instead of pushing the button to the row's
   opposite (left) end. "order" moves it after the title in visual flow
   without touching markup. */
#main-body .card-header h3.card-title > .float-right {
  float: none;
  order: 2;
  margin-right: auto;
}
#main-body .card-header h3.card-title {
  gap: 0.75rem;
}
/* The count badge (e.g. knowledgebase category article counts) used to
   sit right after each row's title text, so its horizontal position
   drifted with every title's length instead of lining up down the list.
   Letting the label grow to fill the row pushes the badge out to the
   row's true end every time, so all the numbers land in one column.
   The badge itself was also just plain colored text with no background —
   giving it a pill chip makes it read as a count label, not stray text. */
#main-body .card-sidebar .sidebar-menu-item-label {
  flex: 1 1 auto;
  min-width: 0;
}
#main-body .card-sidebar .sidebar-menu-item-label .truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#main-body .card-sidebar .sidebar-menu-item-badge {
  flex: 0 0 auto;
}
#main-body .card-sidebar .sidebar-menu-item-badge .badge {
  background: var(--black-95, #f0f0f0);
  color: #08111b;
  border-radius: 999px;
  padding: 0.1875rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}
#main-body .card-sidebar .list-group-item:first-child {
  margin-top: 0.75rem;
}
#main-body .card-sidebar .list-group-item:last-child {
  margin-bottom: 0.75rem;
}
#main-body .card-sidebar .list-group-item:hover {
  background: var(--primary-90, #fef6d9);
  color: #08111b;
}
body #main-body .card-sidebar .list-group-item.active,
body #main-body .card-sidebar .list-group-item.active:hover,
body #main-body .card-sidebar .list-group-item.active:focus {
  background-color: var(--primary);
  color: #08111b;
  font-weight: 700;
}
#main-body .card-sidebar .list-group-item .niva-sidebar-icon,
#main-body .card-sidebar .list-group-item i {
  flex-shrink: 0;
  width: 1.125rem;
  text-align: center;
  color: var(--black-50);
  font-size: 0.875rem;
}
#main-body .card-sidebar .list-group-item.active i {
  color: #08111b;
}
/* The breadcrumb (".master-breadcrumb", a sibling of "#main-body" — NOT
   inside it, so the earlier "#main-body .breadcrumb" rule never matched
   anything here) picked up the global "a{text-decoration:underline}" and
   sat right under the header with only 9px of its own padding. */
.master-breadcrumb {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.master-breadcrumb .breadcrumb a {
  text-decoration: none;
}
.master-breadcrumb .breadcrumb a:hover {
  text-decoration: underline;
}
/* Bootstrap's breadcrumb spacing is asymmetric on purpose for LTR: each
   item's own "padding-left:8px" is the gap AFTER its separator, and the
   separator's own "padding-right:8px" is the gap BEFORE it — in an LTR
   row those stack into one consistent 8px gap either side of every "/".
   Nothing here flips for RTL, so per item the two 8px paddings that used
   to sit on opposite sides of the "/" now both land on the SAME side
   (between one item's text and the next item's "/"), stacking into a
   16px gap there while the "/" itself sits flush against the following
   item's text with none at all. Resetting both to one shared, symmetric
   padding on the separator itself fixes the gap regardless of side. */
.master-breadcrumb .breadcrumb-item {
  padding: 0;
}
.master-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  padding: 0 0.375rem;
}

/* Single-announcement page (viewannouncement.tpl) — its bare "<h1>" picked
   up the theme's default heading size (48px), way too large for what's
   really just a page title next to a small date/time line. */
#main-body .card h1 {
  font-size: 1.625rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
#main-body .primary-content .card {
  border-radius: 0.75rem;
  overflow: hidden;
}
/* The "بر اساس ماه" (by-month) sidebar list is generated by WHMCS core
   (not one of our templates) and always lists up to 10 months before its
   own "Older"/"RSS" links — a long scroll of mostly-irrelevant old months
   made the whole sidebar (and page) feel much taller than it needed to.
   Hiding everything past the 5th item keeps just the recent months
   visible while leaving the real "Older"/"RSS" links (always the last
   two items) untouched — "nth-last-child" rather than a fixed count
   keeps this correct even if the exact number of months WHMCS renders
   ever changes. */
#main-body [id^="Primary_Sidebar-Announcements_Months-"]:nth-child(n+6):nth-last-child(n+3) {
  display: none;
}
/* Single-announcement "برگشت" link used the plain grey outline shared by
   every other secondary button — the one action on this page, so it gets
   the same solid brand treatment as a primary CTA instead. Turns out this
   link sits OUTSIDE ".card-body" entirely (after the card's closing tag,
   a direct child of ".primary-content"), which is why targeting it via
   that assumed ancestor chain never matched anything — given a real class
   in the template instead of relying on fragile DOM-position guessing. */
#main-body .niva-announcement-back {
  background: #08111b;
  border: none;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#main-body .niva-announcement-back:hover {
  background: var(--primary);
  color: #08111b;
}

/* ==========================================================================
   Downloads (templates/nivahost/downloads.tpl, downloadscat.tpl) — the
   search box was a plain Bootstrap input-group (field on the right,
   button trailing on the left, no shared border), and the file list sat
   inside one big bordered card with no separation between files.
   ========================================================================== */
#main-body .kb-search {
  display: flex;
  width: 100%;
  border: 1px solid var(--black-90);
  border-radius: 0.75rem;
  overflow: hidden;
}
#main-body .kb-search .form-control {
  flex: 1 1 auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
#main-body .kb-search .input-group-append {
  flex: 0 0 auto;
}
#main-body .kb-search .btn {
  height: 100%;
  border: none;
  border-radius: 0;
  background: var(--primary);
  color: #08111b;
  font-weight: 700;
}
#main-body .kb-search .btn:hover {
  background: #08111b;
  color: var(--primary);
}
/* The list of files sat inside one big bordered/shadowed card with no
   visual separation between individual files — dropping the outer card's
   own framing and giving each file its own bordered card in its place
   reads as a set of independent items instead of one solid block. */
#main-body .primary-content .card:has(.kb-article-item) {
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: transparent;
}
#main-body .primary-content .card:has(.kb-article-item) > .card-body {
  padding-left: 0;
  padding-right: 0;
}
#main-body .kb-article-item {
  display: block;
  background: #fff;
  border: 1px solid var(--black-95, #f0f0f0) !important;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  color: #08111b;
}
#main-body .kb-article-item:hover {
  border-color: var(--black-90) !important;
  background: var(--black-98, #fafafa);
}
#main-body .kb-article-item:last-child {
  margin-bottom: 0;
}
#main-body .kb-article-item small {
  display: block;
  margin: 0.25rem 0 0;
  padding-left: 0;
  color: var(--black-30);
}
/* ".label-danger" ("محصور"/restricted badge on clients-only files) is an
   old Bootstrap 3 class this theme never styled (it uses newer ".badge-*"
   classes everywhere else) — white text on a transparent background,
   completely invisible against this white card. */
#main-body .label-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #c0392b;
  color: #fff;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   New support ticket form (submitticket.php?step=2) — plain unstyled
   Bootstrap fields (name/email/subject) with none of the border/radius
   language used by the department/priority dropdowns beside them; a
   markdown editor toolbar whose corner-rounding assumed LTR button order;
   an attachment "Browse" button positioned for LTR (its own right:0
   collides with this page's RTL text instead of clearing it); and the
   same three-part captcha layout bug fixed elsewhere in the cart flow,
   here appearing for the first time outside it.
   ========================================================================== */
#main-body .card-body.extra-padding .form-control:not(.niva-custom-select-native) {
  width: 100%;
  border: 1px solid var(--black-90);
  border-radius: 0.625rem;
  padding: 0.5rem 0.875rem;
}
#main-body .card-body.extra-padding .form-control:not(.niva-custom-select-native):focus {
  border-color: var(--primary);
  box-shadow: none;
}
/* Several rows in this form (name+email, the subject field, etc.) use
   Bootstrap column counts that don't actually add up to 12 (e.g.
   "col-md-4"+"col-md-5" = 9/12, "col-md-10" alone for the subject field)
   — each field itself correctly filled its OWN column at 100% width, but
   the columns themselves left real empty space at the row's edge. Forcing
   every field's own column to stretch and share the row equally removes
   that gap regardless of whatever column count WHMCS assigned it. */
#main-body .card-body.extra-padding > .row {
  display: flex;
}
#main-body .card-body.extra-padding > .row > [class*="col-"] {
  flex: 1 1 0;
  max-width: none;
  width: auto;
}
/* "لغو" (cancel) is a plain, unstyled ".btn-default" like several other
   secondary actions elsewhere in the theme — same outline treatment.
   Scoped to "p.text-center" specifically (where it sits next to "ارسال")
   rather than the whole card, since the markdown editor toolbar's own
   small icon buttons further up are ALSO ".btn-default" and need to keep
   their own plain look, not this outlined-pill treatment. */
#main-body .card-body.extra-padding > p.text-center > .btn-default {
  background: #fff;
  border: 1.5px solid #08111b;
  color: #08111b;
  font-weight: 700;
  border-radius: 0.625rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#main-body .card-body.extra-padding > p.text-center > .btn-default:hover {
  background: #08111b !important;
  color: var(--primary) !important;
}

/* Markdown editor toolbar: Bootstrap's ".btn-group > .btn:first-child /
   :last-child" corner-rounding assumes the group's first child sits at
   the LTR-left end — under this RTL page the first child is actually at
   the right, so the rounded corners landed on the inner seams between
   buttons instead of the group's true outer edges. Rounding every button
   individually sidesteps the connected-group corner logic entirely,
   which reads just as clean for a toolbar of small icon buttons. */
#main-body .md-header.btn-toolbar .btn {
  border-radius: 0.375rem !important;
  margin: 0 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2.5rem;
  box-sizing: border-box;
}
/* The "پیش‌نمایش" (preview) toggle uses ".btn-primary" (WHMCS/bootstrap-
   markdown's own way of marking it as the toolbar's "active" button) —
   but our sitewide ".btn-primary" rule above also makes it bold, which
   widens it noticeably next to its plain ".btn-default" siblings. Kept
   the brand color here, dropped just the extra boldness. */
#main-body .md-header.btn-toolbar .btn-primary {
  font-weight: 400;
}
/* The markdown editor's own outer box (textarea + toolbar container)
   never had any radius — square corners next to every other rounded
   field/card on this page. */
#main-body .md-editor {
  border-radius: 0.625rem;
  overflow: hidden;
}

/* Attachment "Browse" button (Bootstrap 4's ".custom-file" component) is
   entirely LTR-built: its "::after" pseudo-button pins to "right:0" and
   the label's padding was never mirrored to clear space for it — in RTL,
   that put the "Browse" chip on the same side the placeholder text starts
   from, so the text ran straight underneath it. Moving the chip to the
   true trailing edge (left, in RTL) and padding the label to clear it
   fixes both the overlap and gives the whole control real corners. */
#main-body .custom-file-label {
  border-radius: 0.625rem !important;
  padding-right: 0.875rem;
  padding-left: 6.5rem;
}
#main-body .custom-file-label::after {
  content: "انتخاب";
  right: auto;
  left: 0;
  top: 0;
  height: 2.5rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: none;
  border-right: 1px solid var(--black-90);
  border-radius: 0.625rem 0 0 0.625rem !important;
}
/* The "افزودن موارد دیگر" button used to be styled as if it were welded
   to the file field (flush against it, half-rounded like one continuous
   input-group) — visually it read as one oversized, oddly-shaped control
   rather than two separate actions. Given its own gap and full rounding,
   same as everything else on this page. */
#main-body .attachment-group.input-group {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
/* Bootstrap gives ".custom-file" (the file-name field) a fixed explicit
   height, not "auto" — so "align-items:stretch" on the flex row above
   can't actually stretch it to match its sibling; explicitly matching
   the same height on both is what makes the row line up. */
#main-body .attachment-group .custom-file,
#main-body .attachment-group .custom-file-label,
#main-body .attachment-group .input-group-append,
#main-body .attachment-group .input-group-append .btn {
  height: 2.5rem;
}
#main-body .attachment-group .input-group-append {
  flex: 0 0 auto;
}
#main-body .attachment-group .input-group-append .btn {
  height: 100%;
  border-radius: 0.625rem !important;
}

/* Ticket sidebar's "CC Recipients" card (core WHMCS widget) — the email
   input and its "افزودن" submit button were welded together as one
   half-rounded control like the attachment field used to be; same fix,
   given its own gap and full rounding. Existing CC rows (once any are
   added) get spacing/rounding to match every other list-group-item row. */
#main-body [menuitemname="CC Recipients"] #containerAddCcEmail {
  display: flex;
  align-items: stretch;
}
#main-body [menuitemname="CC Recipients"] #containerAddCcEmail .form-control {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 0 0.625rem 0.625rem 0 !important;
}
#main-body [menuitemname="CC Recipients"] #containerAddCcEmail .btn {
  flex: 0 0 auto;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  border-radius: 0.625rem 0 0 0.625rem !important;
  border-color: var(--black-90);
}
#main-body [menuitemname="CC Recipients"] .ticket-cc-item {
  padding: 0.5rem 0.875rem;
}
#main-body [menuitemname="CC Recipients"] .ticket-cc-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
}
#main-body [menuitemname="CC Recipients"] .ticket-cc-email .pull-right {
  float: none;
}

/* "مالک" (owner) badge on the ticket-info reply's "posted by" line sat
   flush against the surrounding text with square corners, unlike every
   other badge/label on the site. */
#main-body .ticket-reply .posted-by .label.requestor-badge {
  border-radius: 999px;
  margin: 0 0.375rem;
}

/* Same "flag + dial-code / domain-search captcha" layout fix applied
   elsewhere in the cart flow and the homepage — this is the same stock
   "#default-captcha-domainchecker" markup (label full-width, then image
   + input as two flex items) appearing here for the first time outside
   those two contexts. This particular ".row" renders with
   "flex-direction: row-reverse" (this theme's RTL Bootstrap build flips
   ".row" that way), which cancels back out to an LTR-like visual order —
   so "order: 1" here actually lands on the LEFT and "order: 2" on the
   RIGHT, the opposite of a plain RTL row. Image gets the lower order to
   put it on the left, input the higher order to put it on the right. */
#main-body #default-captcha-domainchecker {
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}
#main-body #default-captcha-domainchecker > p {
  flex: 1 0 100%;
}
#main-body #default-captcha-domainchecker .captchaimage,
#main-body #default-captcha-domainchecker .col-6 {
  flex: 0 1 auto;
  width: auto;
  max-width: none;
}
#main-body #default-captcha-domainchecker .captchaimage {
  order: 1;
}
#main-body #default-captcha-domainchecker .col-6:last-child {
  order: 2;
}
#main-body #default-captcha-domainchecker .form-control {
  border-radius: 0.625rem;
}
/* The captcha "<img>" itself picks up a 1px border from somewhere in the
   theme's base styles (reads as an unwanted extra frame around it) and
   was also being downscaled from its real 100x24 size to ~72x19 by
   whatever was sizing ".captchaimage" before the fix above, which is
   why it looked soft/blurry. Removing the border and letting it render
   at its natural size fixes both. */
#main-body #default-captcha-domainchecker .captchaimage img {
  border: none !important;
  width: auto !important;
  height: auto !important;
}
/* ".captchaimage" (flex-shrink: 1, inherited from the shared rule above)
   was still squeezing the image below its real size whenever the row
   ran short on space — flex-shrink applies even with "width: auto" set,
   since that only changes the flex-basis, not whether shrinking is
   allowed. Locking it to its content size lets the input shrink instead. */
#main-body #default-captcha-domainchecker .captchaimage {
  flex-shrink: 0;
}

/* Knowledgebase category cards: the article-count badge used to sit
   inline next to the title on the same line ("float-right", which this
   RTL page's own theme.css already flips to render on the physical left).
   Stacking it above the title instead needs the heading to become a
   column flex container — the badge (still first in the DOM) becomes
   the top row, and the icon+title (now wrapped in their own span so they
   stay together as a single flex item) become the row below. "align-self:
   flex-end" puts the badge at the LEFT: in an RTL column flex container
   the cross axis still runs along the text direction, so its start is
   the right edge and its end is the left one. */
#main-body .kb-category .niva-kb-category-heading {
  display: flex;
  flex-direction: column;
}
#main-body .kb-category .niva-kb-category-heading .badge.float-right {
  float: none;
  align-self: flex-end;
  margin-bottom: 0.5rem;
}

/* Knowledgebase article "پرینت" button: sits inside the "<h1>" next to
   the title as a plain physical "float-right", which this theme does NOT
   flip for a bare ".btn" (only specific badge/nav rules get that
   treatment) — so on this RTL page it floats to the same side the title
   text itself starts from and reads toward, landing right on top of it.
   Floating it left instead puts it clear of the title, matching how the
   rest of the theme places secondary card actions on the opposite side
   from RTL body text. */
#main-body .card-body > h1 > .niva-kb-print-btn {
  float: left !important;
  margin-right: 0.75rem;
}
#main-body .niva-kb-print-icon {
  margin-left: 0.375rem;
}
/* "fa-thumbs-up mr-2" (physical LTR margin) puts the gap on the icon's
   OUTER side; since the icon reads first (rightmost) in this RTL line
   and the vote count follows it toward the left, the gap needs to be on
   the icon's left instead. */
#main-body .niva-kb-useful-icon {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}
#main-body .niva-kb-vote-btn i {
  margin-left: 0.375rem;
}
/* "آیا این پاسخ به شما کمک کرد؟" renders as a real "<h4>", which this
   theme's design-system tokens size at 28px — appropriate for an actual
   section heading, too large for what's really just a small prompt label
   sitting right above two compact buttons. */
#main-body .niva-kb-helpful-heading {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* New-ticket form validation banner (".alert-danger" with a plain "<ul>"
   of error lines): same two bugs as the order-cart ".alert" fixed earlier
   — square corners, and the "<ul>" still carrying its stock LTR
   "padding-left: 40px" that indents bullets away from the edge, which in
   RTL is the wrong side, leaving the bullets flush against the box's
   actual near edge (the right one). */
#main-body .card-body.extra-padding .alert {
  border-radius: 0.625rem;
}
#main-body .card-body.extra-padding .alert ul {
  padding-left: 0;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Domains list (clientarea.php?action=domains) — bringing this page's
   table/toolbar/pagination in line with the card-based look used
   everywhere else in the client area.
   ========================================================================== */
/* Bulk-action toolbar: round every button individually instead of relying
   on Bootstrap's ".btn-group > .btn:first-child/:last-child" corner
   logic, which assumes the group's first child sits at the LTR-left end
   — under this RTL page the first child is actually at the right, so the
   rounded corners would land on the inner seams instead of the group's
   true outer edges. */
#main-body .card-body .btn-group > .btn {
  border-radius: 0.5rem !important;
  margin: 0 1px;
}
#main-body .card-body .btn-group > .btn:disabled {
  opacity: 0.5;
}
/* Bootstrap's ".dropdown-menu" ships "text-align: left" (LTR-authored) —
   in RTL this left-aligns the icon+label items instead of following the
   page's own reading direction. */
#main-body .dropdown-menu {
  text-align: right;
}
#main-body .dropdown-menu .dropdown-item i {
  margin-left: 0.5rem;
}

/* Status label ("فعال"/"منقضی شده" etc.) — plain square corners by
   default; round it into the same pill shape used for every other status
   badge in the theme (service list, knowledgebase counts, etc.). */
#main-body .table-list .label.status {
  border-radius: 0.375rem;
}
/* Row text (domain name, dates) renders noticeably smaller than the
   column headers above it — bumped up for readability, header left
   alone since that size is already correct. */
#main-body .table-list tbody {
  font-size: 0.9375rem;
}

/* Registrar-lock tab: "وضعیت قفل ثبت: فعال" renders as a real "<h2>",
   far larger than any other status line in the theme. */
#main-body #tabReglock h2,
#main-body #tabAutorenew h4 {
  font-size: 1.25rem;
  font-weight: 700;
}
#main-body #tabReglock .label,
#main-body #tabAutorenew .label {
  border-radius: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.9375rem;
}
#main-body #tabReglock .alert {
  border-radius: 0.625rem;
  margin-top: 1rem;
}
#main-body #tabNameservers .alert {
  border-radius: 0.625rem;
  margin-top: 1rem;
}
/* Bootstrap's ".form-check" reserves space for the radio/checkbox with
   "padding-left" and positions the input via a negative "margin-left"
   pulling it into that gap — both LTR-authored assumptions. In RTL the
   label text starts from the right, so the reserved gap and the input
   pulled into it need to be on the right side instead; left as-is, the
   input ends up overlapping the label text. */
#main-body .form-check {
  padding-left: 0;
  padding-right: 1.25rem;
}
#main-body .form-check-input {
  margin-left: 0;
  margin-right: -1.25rem;
}
/* Each "NameServer N" field row had no vertical gap between rows at all
   — squished into one dense block instead of a readable list. */
#main-body #tabNameservers .form-group.row {
  margin-bottom: 0.875rem;
}

/* Private-nameserver forms: "<input>" (where the customer types the
   prefix, e.g. "ns1") comes before the domain-suffix append in the DOM,
   which in this RTL ".input-group" put the domain suffix on the LEFT and
   the blank input on the RIGHT — read left-to-right that's the domain
   name backwards ("aqua-pure-purifier.com ." then a blank field), giving
   no sense of what's being typed. Swapping their visual order puts the
   prefix field on the left and the domain suffix on the right, so the
   two together read correctly left-to-right as "[prefix].domain.com". */
#main-body form[action*="domainregisterns"] .input-group input {
  order: 1;
}
#main-body form[action*="domainregisterns"] .input-group .input-group-append {
  order: -1;
}
/* Dashboard account-summary bar: one wide card (wallet balance | unpaid
   invoice total | client name+id+verification badge) instead of two more
   square stat tiles crowding the quick-stats grid above it — matches the
   single-row summary-bar pattern the request referenced, not the tile
   grid's boxy look. */
#main-body .niva-account-summary-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .125);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
}
#main-body .niva-account-summary-item {
  flex: 1 1 0;
  min-width: 0;
}
#main-body .niva-account-summary-item > a {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
#main-body .niva-account-summary-item > a i {
  color: var(--black-40);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  display: block;
}
#main-body .niva-account-summary-value {
  font-size: 1.0625rem;
  font-weight: 800;
  color: #08111b;
  white-space: nowrap;
}
#main-body .niva-account-summary-label {
  font-size: 0.8125rem;
  color: var(--black-40);
  margin-top: 0.25rem;
}
#main-body .niva-account-summary-divider {
  width: 1px;
  align-self: stretch;
  background: var(--black-95, #f0f0f0);
  margin: 0 1.5rem;
}
#main-body .niva-account-summary-name {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
#main-body .niva-account-summary-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--black-95, #f0f0f0);
  color: var(--black-40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
#main-body .niva-account-summary-fullname {
  font-weight: 700;
  color: #08111b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
#main-body .niva-account-summary-clientid {
  font-size: 0.8125rem;
  color: var(--black-40);
  margin-top: 0.25rem;
}
#main-body .niva-verification-badge {
  border-radius: 999px;
  padding: 0.1875rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
}
#main-body .niva-verification-badge i {
  margin-left: 0.25rem;
}
/* The "احراز هویت ناقص" badge is a real link (to the profile page), but
   should still just look like the plain static badge it was before —
   Bootstrap's own "a.badge-*:hover/:focus" rules darken the background
   and add a focus outline, which reads as an unwanted interactive/hover
   state on what's meant to be a simple status pill. Restating the exact
   same non-hover colors (rather than "inherit", which would pull from the
   parent element, not this badge's own resting state). */
#main-body a.niva-verification-badge.badge-danger:hover,
#main-body a.niva-verification-badge.badge-danger:focus {
  background-color: #dc3545 !important;
  color: #fff !important;
}
#main-body a.niva-verification-badge.badge-success:hover,
#main-body a.niva-verification-badge.badge-success:focus {
  background-color: #28a745 !important;
  color: #fff !important;
}
#main-body a.niva-verification-badge:hover,
#main-body a.niva-verification-badge:focus {
  outline: none;
  text-decoration: none;
  box-shadow: none;
}
/* Profile-incomplete/email-not-verified banner's warning triangle — was
   inheriting the banner's own default (muted) text color, easy to miss.
   Red makes it read as an actual warning at a glance. Note: this banner
   renders outside "#main-body" (it's included from header.tpl, above the
   main content region), unlike most of this file's other rules. */
.niva-profile-banner .fa-exclamation-triangle {
  color: var(--danger, #df1f1f);
}

/* Email verification result page (user/verify/{token}) — its default
   heading (h2) and button (btn-lg) render far larger than anything else
   on the site; a normal-sized heading + default button size matches every
   other confirmation-style card in the theme. */
#main-body .niva-verify-email-heading {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
}
#main-body .niva-verify-email-heading i {
  margin-bottom: 0.75rem;
}
@media (max-width: 767px) {
  #main-body .niva-account-summary-bar {
    flex-wrap: wrap;
    gap: 1rem;
  }
  #main-body .niva-account-summary-divider {
    display: none;
  }
  #main-body .niva-account-summary-name {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* jQuery Knob usage-stat gauges (disk/bandwidth, product-details page):
   the plugin overlays a readonly text input on top of its <canvas> using
   an inline "margin-left: -Npx" it computes assuming an LTR context —
   under this page's inherited "direction: rtl" that offset lands on the
   wrong side, so the "0%"/"4%" label doesn't sit centered on the dial.
   Forcing LTR on just this widget (a numeric gauge, not reading text)
   lets the plugin's own math work as intended. */
#main-body .cpanel-usage-stats {
  direction: ltr;
}

/* Quick email-account creation widget: same "prefix input before domain
   addon in the DOM" pattern as the private-nameserver forms — under this
   RTL page the addon (the domain, e.g. "@aqua-pure-purifier.com") landed
   on the LEFT and the blank prefix field on the RIGHT, backwards from how
   "prefix@domain.com" actually reads left-to-right. Same fix: swap their
   visual order and square off only the inner seam on each side. */
#main-body #cPanelQuickEmailPanel .input-group input {
  order: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}
#main-body #cPanelQuickEmailPanel .input-group .input-group-addon {
  order: -1;
}
/* The visible gray background is actually painted by this inner span, not
   the ".input-group-addon" wrapper around it (which is transparent) — the
   radius has to go here too, or the wrapper's rounded corner has nothing
   behind it and the square-cornered span underneath shows through. */
#main-body #cPanelQuickEmailPanel .input-group-text {
  direction: ltr;
  unicode-bidi: isolate;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0.625rem;
  border-bottom-right-radius: 0.625rem;
}
#main-body #cPanelQuickEmailPanel .input-group input#cpanel-email-prefix {
  text-align: left;
  direction: ltr;
}

/* "مشاهده پیام" (emails list) — plain Bootstrap ".btn-info" blue instead
   of the theme's own brand button style used everywhere else. */
#main-body #tableEmailsList .btn-info {
  background: #08111b !important;
  border-color: #08111b !important;
  color: var(--primary) !important;
}
#main-body #tableEmailsList .btn-info:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #08111b !important;
}

#main-body .niva-registerns-alert {
  border-radius: 0.625rem;
  margin-bottom: 1rem;
}
/* The input and the domain-suffix addon each kept the theme's default
   ".form-control" full 4-corner radius, so where they actually meet
   (input's true-right edge against the addon's true-left edge, per the
   visual left/right order set above) neither corner was square — instead
   of one seamless pill, the two rounded edges pressed together read as a
   broken/gapped joint. Only the two true OUTER corners (input's left,
   addon's right) should be round; the inner seam on both stays square. */
#main-body form[action*="domainregisterns"] .input-group input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}
#main-body form[action*="domainregisterns"] .input-group .input-group-text {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0.625rem;
  border-bottom-right-radius: 0.625rem;
}
#main-body form[action*="domainregisterns"] .form-group.row {
  margin-bottom: 1rem;
}
#main-body form[action*="domainregisterns"] .text-center {
  margin-top: 1.25rem;
}
#main-body form[action*="domainregisterns"] .input-group-text[dir="ltr"] {
  unicode-bidi: isolate;
}
/* Every corner-rounding rule for this table (theme.css) is keyed off
   "var(--rounding-sm/md/lg)" — all three undefined in this theme's token
   set, so every one of those border-radius declarations is invalid and
   the table renders with hard square corners despite the CSS clearly
   intending otherwise. Clipping the whole table via "overflow: hidden"
   sidesteps the fragile "thead th:first-child / tr:last-child td:..."
   per-corner logic entirely too, which assumes the first column sits at
   the LTR-left end — under this RTL table the physical column order is
   flipped, so those rules would round the wrong corners anyway. */
#main-body .table-list {
  border-radius: 0.625rem;
  overflow: hidden;
}

/* ==========================================================================
   Domain renewals (cart/domain/renew) — this page was left half-styled:
   no card framing around each domain row, the header search field kept
   its raw Bootstrap look, and the expiry badge sat flush against the
   domain name.
   ========================================================================== */
/* Page header: search field is a physical ".float-right" inside the
   "<h1>", landing on the same side the RTL title text itself starts
   from and overlapping it, with none of the theme's usual field styling
   (border-radius/color) applied. Floating it left instead clears the
   title, matching how header actions sit elsewhere in the theme. */
#main-body .header-lined h1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
#main-body .header-lined h1 .float-right {
  float: none;
}
#main-body #domainRenewalFilter {
  border: 1px solid var(--black-90) !important;
  border-radius: 0.625rem !important;
  padding: 0.625rem 1rem !important;
  height: auto !important;
  width: 16rem !important;
  max-width: 100%;
  font-size: 0.9375rem;
  line-height: 1.4;
}
/* Each renewal row had no card framing at all — just text floating
   directly on the page background, unlike every other list item in the
   theme. */
#main-body .domain-renewal {
  background: #fff;
  border: 1px solid var(--black-90, #ccc) !important;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
/* The expiry badge is the FIRST element in the DOM (before the domain
   name "<h3>"), floated right — which put the badge at the row's true
   right edge and squeezed the (right-aligned) domain name text up
   against its left side with no gap. Swapped to float left instead: the
   domain name — the actually important part of this row — now owns the
   right edge, with the badge as a secondary note off to its left. */
#main-body .domain-renewal > .float-right {
  float: left !important;
  margin-left: 0;
  margin-right: 0.75rem;
}
#main-body .domain-renewal h3 {
  margin: 0;
}
/* "دوره های تمدید موجود" dropdown: the enhanced select's value text was
   wrapping onto two lines inside its column, and lost the field border
   the rest of the theme's selects/inputs carry. */
#main-body .domain-renewal .niva-custom-select-trigger {
  white-space: nowrap;
}
#main-body .domain-renewal .niva-custom-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#main-body .domain-renewal .form-group.row {
  align-items: center;
  flex-wrap: nowrap;
}
#main-body .domain-renewal .form-group.row .col-md-5 {
  flex: 0 0 auto;
  max-width: none;
  width: auto;
  white-space: nowrap;
}
#main-body .domain-renewal .form-group.row .col-sm-6 {
  flex: 1 1 auto;
  max-width: none;
}
/* ".status-expired"/".status-transferred-away" use "var(--grayscale)" —
   undefined in this theme's token set, so the background-color
   declaration is invalid and the label falls back to illegible default
   (blue-on-blue) styling instead of a neutral "no longer active" look. */
#main-body .table-list .label.status-expired,
#main-body .table-list .label.status-transferred-away {
  background-color: var(--black-50, #9a9a9a) !important;
  color: #fff !important;
}

/* DataTables' length-menu and pagination controls are plain block-level
   siblings inside ".dataTables_wrapper" with no layout of their own, so
   they stack vertically instead of sharing one row. The length control's
   own "<label>" also wraps its custom-select dropdown in a block-level
   "niva-custom-select" div, which likewise dropped it onto its own line
   below the "نمایش" text instead of beside it. */
#main-body .dataTables_wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
#main-body .dataTables_wrapper > .listtable {
  flex: 1 0 100%;
}
#main-body .dataTables_length {
  order: 2;
}
#main-body .dataTables_paginate {
  order: 1;
}
#main-body .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
}
#main-body .dataTables_length .niva-custom-select {
  display: inline-flex;
  width: auto;
}
/* The select-enhancement component (".niva-custom-select-trigger") is
   sized for a full-width form field (generous padding, 0.9375rem font),
   which is why swapping in for the native "<select class="custom-select-
   sm">" here made the "10" dropdown balloon out to match — much bigger
   than the "نمایش"/"مقادیر" text on either side of it. Sized down to a
   small pill instead. */
#main-body .dataTables_length .niva-custom-select-trigger {
  width: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  gap: 0.375rem;
}
#main-body .dataTables_length .niva-custom-select-trigger svg {
  width: 0.625rem;
  height: 0.625rem;
}
/* The "10/25/50" dropdown list is "position: absolute", opening BELOW its
   trigger — but the enclosing ".card { overflow: hidden }" (needed
   elsewhere to clip content to the card's own rounded corners) was
   cutting it off entirely, since it renders near the card's bottom edge
   with nowhere to expand into. This card doesn't have anything else that
   needs edge-to-edge clipping, so it's safe to let content overflow here. */
#main-body .niva-domains-list-card {
  overflow: visible;
}

/* Bootstrap's ".dropdown-toggle::after" caret carries "margin-left"
   (LTR-authored: gaps it from the label sitting to its LEFT). In RTL the
   label "بیشتر" is to the caret's RIGHT instead, so the gap needs to be
   on the caret's right side. Scoped to the id directly — the toolbar
   ".btn-group" is a SIBLING of ".table-container", not nested inside it,
   so that ancestor assumption never matched anything. */
#main-body #btnGroupDrop1::after {
  margin-left: 0;
  margin-right: 0.375rem;
}

/* Site-wide baseline field style. Every ".form-control" styling rule up
   to now was added per-page/per-context as each page got its own pass,
   so any untouched page (e.g. account/contacts — the "نام"/"تلفن" fields
   here) was still rendering plain square-cornered stock Bootstrap
   fields, mismatched against the rounded look the enhanced selects
   (".niva-custom-select-trigger", used for "کشور" here) already carry
   everywhere. This is a low-specificity default only — every existing
   page-specific ".form-control" override (almost all of which are
   already more specific and/or "!important") still wins where one
   exists; this just gives every other field the same look by default. */
#main-body .form-control {
  border: 1px solid var(--black-90, #ccc);
  border-radius: 0.625rem;
}
#main-body .form-control:focus {
  border-color: var(--primary);
  box-shadow: none;
}

/* Status badges placed right next to a field label or card title (e.g.
   "آدرس ایمیل" + تایید‌شده/نشده, "احراز هویت" + انجام‌شده/نشده) — Bootstrap's
   plain ".badge" has no spacing of its own, so in RTL it renders jammed
   flush against the preceding Persian text instead of reading as a
   separate pill. */
#main-body .col-form-label .badge,
#main-body .card-title .badge {
  margin-right: 0.5rem;
  vertical-align: middle;
  font-weight: 500;
}
#main-body .col-form-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* "احراز هویت" card's status/error alert — plain Bootstrap ".alert" has
   square corners, unlike every other alert box on the site (already given
   the same 0.625rem radius under ".card-body.extra-padding .alert"). */
#main-body #nivaIdentityCard .alert {
  border-radius: 0.625rem;
}

/* Persian datepicker popup (تاریخ تولد field, "احراز هویت" card) — appended
   straight to <body>, so it never inherits the theme's own font and falls
   back to the browser default instead of Dana. The theme's Dana files are
   actually registered under the family name "Soleil" (see
   nivahost-design-system.css's @font-face rules) — var(--font-family)
   already points at them under that alias. */
.datepicker-container,
.datepicker-container * {
  font-family: var(--font-family) !important;
}

/* "تاریخ تولد" field in the "احراز هویت" card — same blur-validation look
   already used on the registration form (red border + a message below
   once the field's been touched and left empty). */
.niva-field-error-text {
  display: none;
  color: var(--danger);
  font-size: .8125rem;
  font-weight: 700;
  margin: .5rem 0 0;
}
.niva-field-invalid .form-control {
  border-color: var(--danger) !important;
}
.niva-field-invalid .niva-field-error-text {
  display: block;
}

/* "ایجاد گذرواژه" (generate-password) modal — its ".form-group" rows had
   no gap between them (margin-bottom reset to 0 somewhere in the core
   theme's modal styles) and its inputs never picked up the site-wide
   rounded ".form-control" look, so the length field and the generated-
   password field read as one merged, borderless block. */
#modalGeneratePassword .form-group {
  margin-bottom: 1rem;
}
#modalGeneratePassword .form-control {
  border-radius: 0.625rem;
}
/* The "generate new"/"copy" buttons' icon and label text render flush
   against each other with no gap. */
#modalGeneratePassword .btn i,
#modalGeneratePassword .btn img {
  margin: 0 0.375rem;
}
/* Close (×) button — root cause: Bootstrap's stock ".close" ships
   "margin: -1rem -1rem -1rem auto" to hug the LTR-authored far-right edge
   of the header. "margin-left: auto" is a physical property, so under RTL
   it still eats up all the space on the physical left, shoving the button
   to the physical right instead of mirroring — which is exactly why it
   kept landing next to the title instead of at the header's left edge no
   matter what "justify-content"/absolute-positioning was tried on the
   header itself. Swapping which side gets "auto" fixes it directly. */
#modalGeneratePassword .modal-header {
  align-items: center;
}
#modalGeneratePassword .modal-header .close {
  margin: -1rem auto -1rem -1rem;
  font-size: 3.5rem;
  line-height: 1;
  color: #dc3545;
  opacity: 1;
}

/* Bootstrap's ".form-control.is-valid/.is-invalid" validation icon is
   positioned via "background-position: calc(100% - Npx)" — a physical
   (left-edge-relative) offset, not RTL-aware — landing at the field's
   physical right edge regardless of direction. That's exactly where RTL
   text/password dots start filling from, so the two collide; Bootstrap's
   own fix (reserving padding on that side for the icon) was overridden by
   this theme's site-wide ".form-control" padding reset. Reserve the same
   space again, on the correct (right) side. */
#main-body .form-control.is-valid,
#main-body .form-control.is-invalid {
  padding-right: calc(1.5em + 0.75rem);
}

/* Upgrade/downgrade summary page (upgradesummary.tpl) — "کد تخفیف" field:
   same classic RTL input-group-merge bug as elsewhere this session. The
   button sits physically on the LEFT of the input here, but the corners
   that should be rounded (each element's own OUTER edge) and squared
   (the shared inner seam) were backwards — input rounded all 4 corners
   (including the seam against the button) while the button rounded its
   seam-side corners and squared its own outer edge. */
#main-body input[name="promocode"] {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 0.625rem !important;
  border-bottom-right-radius: 0.625rem !important;
  height: 46px !important;
}
#main-body input[name="promocode"] ~ .input-group-append .btn {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top-left-radius: 0.625rem !important;
  border-bottom-left-radius: 0.625rem !important;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* View-ticket header: the "پاسخ"/"بستن درخواست" buttons used to sit inside
   the <h3> itself via a ".float-sm-right" div — "float-right" is a physical
   property that doesn't mirror under RTL, and a float doesn't reliably
   clear a same-line text node, so the button group visually overlapped the
   RTL-starting title text. Moved to their own row below the title/subject
   in the template; this just gives that row proper spacing/wrapping. */
#main-body .niva-viewticket-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* Site-wide network-issue banner ("ما از یک مشکل تأثیرگذار..."): its
   "اطلاعات بیشتر" link uses Bootstrap's physical ".float-lg-right", which
   doesn't mirror under RTL — it needs to land at the far LEFT edge
   (opposite end of the line from the right-starting warning icon/message),
   not stay pinned to the physical right where it visually crowds the
   message text instead of separating from it. */
.network-issue-alert .alert-link {
  float: left !important;
}
.network-issue-alert .alert-link i {
  margin-left: 0.375rem;
}

/* Dashboard's "تیکت‌های اخیر" widget: the ticket-status label sits flush
   against the ticket subject text right before it, with no breathing
   room. (Its color used to be an uncoordinated muddy olive — fixed at the
   source in tblticketstatuses.color instead of overriding it here, since
   that's a real WHMCS-admin-configurable setting, not theme CSS.) */
/* Dashboard's "تیکت‌های اخیر" widget: the ticket row sits flush against
   the card header (title/"درخواست جدید" button) right above it, with no
   gap at all. */
[menuitemname="Recent Support Tickets"] .list-group {
  padding-top: 0.5rem;
}

/* "#main-body label" (niva-clientarea.css, meant for real form <label>s)
   outranks a plain class selector on specificity alone (ID beats any
   number of classes) — this status badge happens to also be a <label>
   tag, so it was silently losing its white text to that generic rule. */
#main-body .card-accent-blue .list-group-item .label {
  margin-right: 1rem;
  color: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

/* Ticket submission/reply message box (bootstrap-markdown editor) ships
   its own hardcoded monospace font stack on the textarea itself
   ("Menlo, Monaco, Consolas, 'Courier New', monospace") — every other text
   input on the site uses the theme's Dana font, so this one alone looked
   out of place the moment you started typing. */
#main-body .markdown-editor,
#main-body .md-editor textarea {
  font-family: var(--font-family) !important;
}

/* Ticket-info sidebar rows (درخواست‌کننده/بخش/ارسال‌شده/...) — label and
   value were stacked (label, "<br>", value), and row-to-row height varied
   a lot depending on whether that row's value happened to wrap to a
   second line, which read as uneven/messy rather than a clean uniform
   list. Putting label + value on one single line per row (flex, label on
   one side / value on the other, like a real key-value list) instead of
   stacking them gives every row the same shape regardless of content. */
#main-body [menuitemname="Ticket Information"] .ticket-details-children {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--black-90);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#main-body [menuitemname="Ticket Information"] .ticket-details-children:last-child {
  border-bottom: none;
}
#main-body [menuitemname="Ticket Information"] .ticket-details-children br {
  display: none;
}
#main-body [menuitemname="Ticket Information"] .ticket-details-children .title {
  display: inline;
  font-size: 0.75rem;
  color: var(--black-40);
  font-weight: 700;
}
#main-body [menuitemname="Ticket Information"] .ticket-details-children .title::after {
  content: ':';
  margin-left: 0.3em;
}

/* Status/priority split into two real rows via JS (see viewticket.tpl) —
   this one row needs to wrap onto two lines on purpose, unlike every
   other single-line/ellipsis row above. */
#main-body [menuitemname="Ticket Information"] .ticket-details-children.niva-priority-split {
  white-space: normal;
  display: block;
}
#main-body .niva-priority-split-line {
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--black-90);
}
#main-body .niva-priority-split-line:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

/* Ticket-info sidebar's "پاسخ"/"بستن درخواست" quick-action buttons (a core
   WHMCS widget, not part of this theme's own templates) — the columns
   themselves are correctly 50/50 (real ".col-6" is present alongside the
   inert ".col-xs-6"), but "بستن درخواست" is two words that wrap to a
   second line at the button's default padding/font-size, making it visibly
   taller and unevenly weighted next to the single-word "پاسخ" button. */
#main-body [menuitemname="Ticket Information"] .col-button-left .btn,
#main-body [menuitemname="Ticket Information"] .col-button-right .btn {
  padding: 0.5rem 0.125rem;
  font-size: 0.6875rem;
  white-space: nowrap;
  letter-spacing: -0.2px;
  border-radius: 0.625rem;
}
/* Icon and label rendered with zero gap between them by default. */
#main-body [menuitemname="Ticket Information"] .col-button-left .btn i,
#main-body [menuitemname="Ticket Information"] .col-button-right .btn i {
  margin-left: 0.15rem;
}
/* "بستن درخواست" (2 words) needed more room than the 50/50 split gave it
   next to the single-word "پاسخ" button — widen its column and give the
   button itself a bit more breathing room now that it has the space. */
#main-body [menuitemname="Ticket Information"] .col-button-left {
  flex: 0 0 41.66667%;
  max-width: 41.66667%;
}
#main-body [menuitemname="Ticket Information"] .col-button-right {
  flex: 0 0 58.33333%;
  max-width: 58.33333%;
}
#main-body [menuitemname="Ticket Information"] .col-button-right .btn {
  padding: 0.5rem 0.5rem;
  font-size: 0.75rem;
  letter-spacing: normal;
}

/* Domain-renewal cards with a grace/redemption fee show a much longer
   option string in the renewal-period dropdown ("1 ساله @ ... + ...
   تومان هزینه ...") than the plain rows, so the label+select side-by-side
   on one line left the select too cramped. Only these rows (marked with
   "niva-renewal-grace-row" in the template) get the label pushed onto its
   own full-width line with the select given the whole row below it. */
#main-body .domain-renewal .form-group.row.niva-renewal-grace-row {
  flex-wrap: wrap;
}
#main-body .domain-renewal .form-group.row.niva-renewal-grace-row .col-md-5,
#main-body .domain-renewal .form-group.row.niva-renewal-grace-row .col-sm-6 {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
}
#main-body .niva-renewal-grace-row .control-label {
  margin-bottom: 0.375rem;
}
#main-body .domain-renewal .form-group.row.niva-renewal-grace-row {
  margin-bottom: 1rem;
}

/* Network-issue detail card's "ضروری" priority badge sits flush against
   the title text with no gap — "float-md-right" (physical) puts it on the
   same side the RTL title text itself starts reading from. */
#main-body #issuePriorityLabel {
  margin-left: 0.625rem;
}

/* Server-status page's "no open issues" / "scheduled maintenance" banners
   — plain square-cornered stock Bootstrap ".alert", unlike every other
   alert box on the site which is already rounded. */
#main-body .niva-serverstatus-alert {
  border-radius: 0.625rem;
}

/* "ادامه"/"بازگشت به محصول" buttons on the upgrade flow (and the ticket
   submission confirmation page) — their arrow icons render flush against
   the label text with no gap. */
#btnOrderContinue i,
#main-body .btn .fa-arrow-circle-left,
#main-body .btn .fa-arrow-circle-right {
  margin: 0 0.375rem;
}

/* Upgrade-cost note box — plain square-cornered stock ".alert", unlike
   every other alert/card box on the site. */
#main-body #nivaUpgradeCostNote {
  border-radius: 0.625rem;
}

/* "انواع ایمیل" checkbox list (account details page) — bare "<label>"s
   render bold (theme's default label weight) with long two-line Persian
   text and barely any gap between rows, reading as cramped. */
#main-body label:has(input[name^="email_preferences"]) {
  display: flex;
  align-items: center;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.375rem;
}
#main-body .controls.form-check:has(input[name^="email_preferences"]) {
  margin-top: 0.75rem;
}

/* Change-password form: Bootstrap's ".col-form-label" is "display:flex;
   align-items:center" by default, so once the row (".form-group.row")
   stretches that label column to match the tall "new password" row (input
   + strength bar + security-tips alert box), the label centers itself
   inside that whole stretched height instead of sitting at the top next
   to its actual input — reading as floating in the middle of the form,
   nowhere near its field. Rows also had no gap between them, so "رمز عبور
   فعلی" sat flush against the "کلمه عبور جدید" row below it. */
#main-body form.using-password-strength .form-group.row {
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
#main-body form.using-password-strength .col-form-label {
  align-items: flex-start;
  padding-top: 0.5rem;
}

/* Knowledgebase article body content (hand-authored HTML in each article,
   not a theme template) uses bare "<h3>"s for its section headings — these
   render at the browser/theme default h3 size (32px), way oversized next
   to the surrounding article body text. */
#main-body article h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Joker registrar module's own "Manage DNSSEC DS Records" page
   (modules/registrars/joker/dnssec_ds.tpl, not a theme template) ships a
   bare "<h3>" with no margin, sitting directly under ".primary-content"
   with nothing else around it — it reads as glued to the breadcrumb above
   it, unlike every other page's title which has a card/header wrapper. */
#main-body .primary-content > h3:first-child {
  margin-top: 1.5rem;
}
/* Joker DNSSEC page's "Refresh"/"Delete DNSSEC configuration"/"Save
   Changes" buttons sit flush against each other with no gap. */
#main-body .text-center:has(> button[name="refresh"]) {
  display: flex;
  justify-content: center;
  gap: 0.625rem;
}

/* IRNIC registrar module's own "اطلاعات دامنه در سامانه ..." heading
   (modules/registrars/subirnic/clientarea.tpl, not a theme template) ships
   a bare "<h2>" with no class, so it renders at the browser/theme default
   h2 size (36px) — way oversized next to this page's real card titles
   (16px). ".moduleoutput" is the stable wrapper WHMCS gives any
   registrar/server module's raw HTML output. */
#main-body .moduleoutput h2 {
  font-size: 1rem;
  font-weight: 700;
}

/* Domain-details "بررسی" (overview) tab's field labels ("دامنه:", "تاریخ
   ثبت:", "وضعیت SSL", ...) are bare "<h5>"s with no class, rendering at
   the theme's default h5 size (24px) — too large for what's really just a
   field label sitting above its value. */
#main-body #tabOverview h5 {
  font-size: 1rem;
  font-weight: 700;
}
/* "چه کاری انجام دهید؟" bullet list is a bare "<ul>" with no padding, so
   under RTL its bullets sit flush against the card's own right edge. */
#main-body #tabOverview ul {
  padding-right: 1.25rem;
}
/* "بررسی" card title has zero margin-bottom, so the first field row
   (دامنه / مبلغ اولین پرداخت) sits right up against it. */
#main-body #tabOverview h3.card-title {
  margin-bottom: 1.25rem;
}
