/* ================================================================
   FaraMizban WHMCS — FINAL clean theme (v4)
   Brand colors from fara-mizban.ir: navy bg + blue + amber
   ================================================================ */
:root {
  --fm-bg: #050814;
  --fm-card: #0f172a;
  --fm-card2: #16233f;
  --fm-primary: #3b82f6;
  --fm-primary2: #1d4ed8;
  --fm-accent: #f59e0b;
  --fm-text: #f8fafc;
  --fm-text2: #cbd5e1;
  --fm-muted: #a8b6cc;
  --fm-border: rgba(148,163,184,.2);
}

/* ---------- GLOBAL reset (highest specificity, last loaded) ---------- */
html, body, #body-area,
.panel, .card, .well, .modal-content, .dropdown-menu, .list-group-item,
.table, table, .form-control, input[type=text], input[type=email],
input[type=password], input[type=tel], select, textarea, .input-group {
  background-color: var(--fm-bg) !important;
  color: var(--fm-text) !important;
  font-family: 'Vazirmatn', Tahoma, sans-serif !important;
  font-size: 15px;
}
body { background: var(--fm-bg) !important; line-height: 1.9; }
#header, .topbar, #footer, .navbar { background: #0b1220 !important; }
#header { border-bottom: 1px solid rgba(59,130,246,.35) !important; }
#footer { border-top: 1px solid rgba(59,130,246,.3) !important; margin-top: 40px; padding: 26px 0; }

/* ---------- text everywhere readable ---------- */
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.panel-title,.card-title,
p,span,li,td,th,label,small,strong,b,dt,dd,blockquote,pre,code,
.panel-body,.card-body,.dropdown-menu li,.dropdown-menu a,.well,.modal-body {
  color: var(--fm-text) !important;
}
small,.text-muted,.help-block,.breadcrumb,.breadcrumb a,.form-text {
  color: var(--fm-muted) !important;
}
a { color: var(--fm-primary) !important; text-decoration: none; }
a:hover { color: #93c5fd !important; }

/* panels & tables */
.panel,.card,.well,.list-group-item { background: var(--fm-card) !important; border: 1px solid var(--fm-border) !important; border-radius: 14px !important; }
.panel-heading,.card-header { background: var(--fm-card2) !important; color: var(--fm-text) !important; border-color: var(--fm-border) !important; border-radius: 13px 13px 0 0 !important; }
.panel-title { color: var(--fm-text) !important; font-weight: 800; }
table th { background: var(--fm-card2) !important; color: var(--fm-text) !important; }
table td { border-color: var(--fm-border) !important; }
.table-striped > tbody > tr:nth-of-type(odd) { background: rgba(255,255,255,.04) !important; }
.table-hover > tbody > tr:hover { background: rgba(59,130,246,.1) !important; }

/* forms */
.form-control, input[type=text], input[type=email], input[type=password],
input[type=tel], select, textarea {
  background: #0b1220 !important; color: var(--fm-text) !important;
  border: 1.5px solid var(--fm-border) !important; border-radius: 11px !important;
  padding: 10px 14px !important; font-size: 15px !important;
}
.form-control:focus { border-color: var(--fm-primary) !important; box-shadow: 0 0 0 3px rgba(59,130,246,.18) !important; }
.input-group-addon, .input-group-text { background: var(--fm-card2) !important; color: var(--fm-text) !important; border-color: var(--fm-border) !important; }

/* buttons */
.btn { border-radius: 11px !important; font-weight: 700 !important; font-size: 14px !important; padding: 10px 20px !important; }
.btn-primary,.btn-success,.btn-info,.btn-danger {
  background: linear-gradient(135deg, var(--fm-primary), var(--fm-primary2)) !important;
  border: none !important; color: #fff !important;
  box-shadow: 0 5px 16px rgba(59,130,246,.25) !important;
}
.btn-primary:hover,.btn-success:hover,.btn-info:hover,.btn-danger:hover { filter: brightness(1.1) !important; }
.btn-default,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-light,.btn-link.btn {
  background: rgba(255,255,255,.06) !important; color: var(--fm-text) !important;
  border: 1.5px solid var(--fm-border) !important;
}
.btn-default:hover,.btn-outline-primary:hover,.btn-outline-secondary:hover { border-color: var(--fm-primary) !important; color: #fff !important; }
.badge,.badge-info,.badge-primary,.label,.label-info,.label-primary { background: var(--fm-primary) !important; color: #fff !important; border-radius: 20px !important; padding: 4px 10px !important; }

/* alerts */
.alert { border-radius: 12px !important; font-weight: 600; }
.alert-info { background: rgba(59,130,246,.14) !important; border: 1px solid rgba(59,130,246,.45) !important; color: #bfdbfe !important; }
.alert-success { background: rgba(16,185,129,.14) !important; border: 1px solid rgba(16,185,129,.45) !important; color: #a7f3d0 !important; }
.alert-warning { background: rgba(245,158,11,.14) !important; border: 1px solid rgba(245,158,11,.45) !important; color: #fde68a !important; }
.alert-danger { background: rgba(239,68,68,.14) !important; border: 1px solid rgba(239,68,68,.45) !important; color: #fecaca !important; }

/* modal */
.modal-content { border: 1px solid var(--fm-border) !important; border-radius: 16px !important; }
.modal-header,.modal-footer { border-color: var(--fm-border) !important; }

/* dropdown */
.dropdown-menu { border: 1px solid var(--fm-border) !important; border-radius: 12px !important; box-shadow: 0 10px 30px rgba(0,0,0,.6) !important; }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { background: rgba(59,130,246,.16) !important; color: #fff !important; }

/* nav */
.navbar-brand { color: var(--fm-text) !important; font-weight: 900 !important; font-size: 18px !important; }
.navbar-nav > li > a, #header .btn { color: var(--fm-text2) !important; background: transparent !important; }
.navbar-nav > li > a:hover { color: #fff !important; }
#header .btn-primary, #header .cart-btn {
  background: linear-gradient(135deg,var(--fm-primary),var(--fm-primary2)) !important;
  color: #fff !important; border: none !important;
}
#header .form-control { background: #050814 !important; border-color: var(--fm-border) !important; }
#secondary-sidebar .panel-heading, .sidebar .panel-heading { background: transparent !important; color: var(--fm-primary) !important; }
.breadcrumb { background: transparent !important; }

/* pagination */
.pagination > li > a, .pagination > li > span { background: var(--fm-card) !important; color: var(--fm-text2) !important; border-color: var(--fm-border) !important; }
.pagination > .active > a { background: linear-gradient(135deg,var(--fm-primary),var(--fm-primary2)) !important; border-color: transparent !important; color: #fff !important; }

/* ================================================================
   PAGE BUILDER (fm-*) — hero / search / sections
   ================================================================ */
.fm-hero { padding: 46px 0 24px; text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,.16), transparent 62%); }
.fm-hero-inner { max-width: 780px; margin: 0 auto; padding: 0 18px; }
.fm-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.45); color: #93c5fd !important; padding: 7px 18px; border-radius: 30px; font-size: 12.5px; font-weight: 800; margin-bottom: 16px; }
.fm-hero h1 { color: var(--fm-text) !important; font-size: 32px; font-weight: 900; margin-bottom: 12px; line-height: 1.4; }
.fm-hero h1 span { color: var(--fm-primary) !important; }
.fm-hero p { color: var(--fm-muted) !important; font-size: 14px; margin-bottom: 22px; }
.fm-hero-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.fm-btn { padding: 12px 24px !important; border-radius: 12px !important; font-weight: 800 !important; font-size: 13.5px !important; display: inline-flex; align-items: center; gap: 8px; }
.fm-btn-grad { background: linear-gradient(135deg,var(--fm-primary),var(--fm-primary2)) !important; color: #fff !important; border: none !important; }
.fm-btn-outline { background: rgba(255,255,255,.05) !important; border: 1.5px solid var(--fm-border) !important; color: var(--fm-text) !important; }
.fm-btn-outline:hover { border-color: var(--fm-primary) !important; }
.fm-btn-block { width: 100%; justify-content: center; }

/* domain search */
.fm-dsearch { max-width: 860px; margin: 6px auto 34px; padding: 0 16px; }
.fm-dsearch-box { background: linear-gradient(180deg,#101c33,#0b1220); border: 1.5px solid rgba(59,130,246,.4); border-radius: 22px; padding: 28px 22px; }
.fm-dsearch-box h2 { color: var(--fm-text) !important; font-size: 19px; font-weight: 900; margin-bottom: 5px; }
.fm-dsearch-box h2 i { color: var(--fm-primary) !important; }
.fm-ds-sub { color: var(--fm-muted) !important; font-size: 12.5px; margin-bottom: 18px; }
.fm-ds-input-wrap { display: flex; gap: 8px; background: #050814; border: 1.5px solid rgba(59,130,246,.3); border-radius: 14px; padding: 7px; }
.fm-ds-input-wrap input { background: transparent !important; border: none !important; color: var(--fm-text) !important; direction: ltr; text-align: left; font-size: 15px !important; padding: 10px !important; }
.fm-ds-btn { background: linear-gradient(135deg,var(--fm-primary),var(--fm-primary2)) !important; color: #fff !important; white-space: nowrap; }
.fm-ds-tlds { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; justify-content: center; }
.fm-tld { background: rgba(59,130,246,.08) !important; border: 1px solid rgba(59,130,246,.3) !important; color: var(--fm-muted) !important; padding: 6px 14px !important; border-radius: 30px !important; font-size: 12px !important; }
.fm-tld.active, .fm-tld:hover { background: linear-gradient(135deg,var(--fm-primary),var(--fm-primary2)) !important; color: #fff !important; }
.fm-ds-result { margin-top: 16px; display: none; }
.fm-ds-result.show { display: block; }
.fm-ds-out { background: #0b1220; border: 1px solid rgba(59,130,246,.25); border-radius: 14px; padding: 18px; max-height: 460px; overflow-y: auto; }
.fm-ds-hint { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; padding-top: 15px; border-top: 1px dashed rgba(148,163,184,.25); font-size: 11.5px; color: var(--fm-muted) !important; }
.fm-tld-price { background: rgba(59,130,246,.1); color: var(--fm-text2) !important; padding: 4px 12px; border-radius: 20px; }

/* sections */
.fm-section { max-width: 1150px; margin: 34px auto; padding: 0 16px; }
.fm-sec-head { text-align: center; margin-bottom: 22px; }
.fm-sec-head h2 { color: var(--fm-text) !important; font-size: 21px; font-weight: 900; }
.fm-sec-head p { color: var(--fm-muted) !important; font-size: 13px; margin-top: 3px; }

/* ================================================================
   PLANS — 1 column, price → button → specs at bottom (CLEAR)
   ================================================================ */
.fm-plans-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 13px !important; max-width: 720px; margin: 0 auto; }
.fm-plan-card {
  background: var(--fm-card) !important;
  border: 1px solid var(--fm-border) !important;
  border-radius: 18px !important;
  padding: 20px 20px 16px !important;
  display: flex !important; flex-direction: column !important;
  align-items: stretch; text-align: right; position: relative;
  margin: 0 !important; min-height: unset !important;
}
.fm-plan-card.fm-popular { border: 1.5px solid rgba(59,130,246,.7) !important; background: linear-gradient(180deg,#132741,var(--fm-card)) !important; }
.fm-plan-badge { position: absolute; top: -10px; right: 16px; background: linear-gradient(135deg,var(--fm-primary),var(--fm-primary2)) !important; color: #fff !important; font-size: 10.5px !important; font-weight: 800 !important; padding: 3px 12px !important; border-radius: 20px !important; }
.fm-plan-card h3 { color: var(--fm-text) !important; font-size: 16.5px !important; font-weight: 900 !important; margin: 0 0 10px !important; padding: 0 !important; }
/* price row */
.fm-plan-price { order: 1; margin: 0 0 12px !important; padding: 0 !important; background: transparent !important; }
.fm-price-num { color: var(--fm-primary) !important; font-size: 17px !important; font-weight: 900 !important; }
/* order button */
.fm-plan-card .fm-btn { order: 2; margin: 0 !important; }
/* specs box at BOTTOM */
.fm-plan-desc {
  order: 3 !important;
  margin: 13px 0 0 !important; padding: 11px 15px !important;
  background: #0b1220 !important; border: 1px dashed rgba(59,130,246,.4) !important;
  border-radius: 12px !important;
  color: var(--fm-text2) !important; font-size: 12.5px !important; line-height: 2.1 !important;
  text-align: right !important; flex: none !important; width: 100% !important;
}
.fm-plan-card:hover { border-color: var(--fm-primary) !important; }

/* ---- AI ---- */
.fm-ai-box { background: var(--fm-card) !important; border: 2px solid rgba(59,130,246,.55) !important; border-radius: 22px !important; padding: 30px 22px; text-align: center; }
.fm-ai-badge { color: var(--fm-accent) !important; border: 1px solid var(--fm-accent) !important; background: rgba(245,158,11,.1) !important; padding: 5px 16px; border-radius: 30px; font-size: 12px; font-weight: 800; display: inline-flex; gap: 7px; margin-bottom: 14px; }
.fm-ai-box h2 { color: var(--fm-text) !important; font-size: 19px; font-weight: 900; margin-bottom: 8px; }
.fm-ai-box > p { color: var(--fm-muted) !important; font-size: 13px; margin-bottom: 20px; }
.fm-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fm-feat { background: #0b1220 !important; border: 1px solid var(--fm-border) !important; border-radius: 14px !important; padding: 18px 13px; text-align: right; }
.fm-feat i { color: var(--fm-primary) !important; font-size: 20px; margin-bottom: 10px; display: block; }
.fm-feat h4 { color: var(--fm-text) !important; font-size: 13.5px !important; font-weight: 800; margin-bottom: 5px; }
.fm-feat p { color: var(--fm-muted) !important; font-size: 11.5px !important; line-height: 1.8; }

/* ---- FAQ ---- */
.fm-faq { max-width: 740px; margin: 0 auto; display: flex; flex-direction: column; gap: 9px; }
.fm-faq-item { background: var(--fm-card) !important; border: 1px solid var(--fm-border) !important; border-radius: 13px !important; padding: 16px 18px; cursor: pointer; }
.fm-faq-item:hover { border-color: var(--fm-primary) !important; }
.fm-faq-q { color: var(--fm-text) !important; font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.fm-faq-q i { color: var(--fm-primary) !important; font-size: 11px; }
.fm-faq-a { color: var(--fm-text2) !important; font-size: 12.5px; margin-top: 9px; line-height: 2; display: none; }
.fm-faq-item.fm-open .fm-faq-a { display: block; }

/* ---- contact ---- */
.fm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fm-contact-card { background: var(--fm-card) !important; border: 1px solid var(--fm-border) !important; border-radius: 16px !important; padding: 24px 16px !important; text-align: center; }
.fm-contact-card:hover { border-color: var(--fm-primary) !important; }
.fm-contact-card i { color: var(--fm-primary) !important; font-size: 24px; margin-bottom: 10px; display: block; }
.fm-contact-card h4 { color: var(--fm-text) !important; font-size: 14.5px !important; margin-bottom: 4px !important; }
.fm-contact-card p { color: var(--fm-muted) !important; font-size: 12px !important; }

/* ================================================================
   MOBILE
   ================================================================ */
@media (max-width: 992px) {
  .fm-hero { padding: 30px 0 18px; }
  .fm-hero h1 { font-size: 23px; }
  .fm-hero p { font-size: 12.5px; }
  .fm-hero-btns { flex-direction: column; }
  .fm-hero-btns .fm-btn { width: 100%; max-width: 300px; margin: 0 auto; }
  .fm-dsearch { margin: 4px auto 24px; }
  .fm-dsearch-box { padding: 20px 14px; border-radius: 16px; }
  .fm-dsearch-box h2 { font-size: 16px; }
  .fm-ds-input-wrap { flex-direction: column; }
  .fm-ds-btn { width: 100%; justify-content: center; }
  .fm-sec-head h2 { font-size: 17px; }
  .fm-plans-grid { gap: 11px !important; }
  .fm-plan-card { padding: 16px 15px 14px !important; }
  .fm-plan-card h3 { font-size: 15px !important; }
  .fm-plan-desc { font-size: 11.5px !important; padding: 9px 12px !important; }
  .fm-ai-box { padding: 22px 14px; }
  .fm-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .fm-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .fm-feat, .fm-contact-card { padding: 14px 11px; }
  .container { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 480px) {
  .fm-grid-4, .fm-grid-3 { grid-template-columns: 1fr; }
  .fm-hero h1 { font-size: 21px; }
}

/* ================================================================
   v5 — orderform/cart pages had WHITE background (separate template
   scope). Force the dark brand theme there too + readable text.
   ================================================================ */
body, .primary-bg-color {
  background: #050814 !important;
  color: #f8fafc !important;
}
/* orderform product cards: light-on-light was the bug */
.order-form .product, .product, .products .product,
.order-form .panel, .order-form .card {
  background: #0f172a !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  border-radius: 16px !important;
  color: #f8fafc !important;
}
.order-form .product .product-info, .order-form .product h3,
.product .product-desc, .product .panel-title {
  color: #f8fafc !important;
}
.order-form .product .product-pricing, .order-form .price,
.product .price, .product p {
  color: #cbd5e1 !important;
}
.order-form .product .btn, .product .btn {
  background: linear-gradient(135deg,#3b82f6,#1d4ed8) !important;
  border: none !important; color: #fff !important;
}
/* breadcrumb bar was white-on-white */
.master-breadcrumb, .breadcrumb { background: transparent !important; color: #94a3b8 !important; }
.master-breadcrumb a, .breadcrumb a { color: #3b82f6 !important; }
/* domain checker page bg + text */
.domain-checker, #order-standard_cart, .order-form {
  background: #050814 !important;
  color: #f8fafc !important;
}
/* giant search input on cart domain page */
#inputDomain, .input-group-box .form-control {
  background: #0b1220 !important; color: #f8fafc !important;
  border: 1.5px solid rgba(59,130,246,.4) !important;
}
/* result rows readable */
.domain-checker table td, .domain-checker table th {
  color: #f8fafc !important; border-color: rgba(148,163,184,.2) !important;
}
