/* Sarv — dark theme for sarv.io (WHMCS), same scale as the static sites (sarv-sites global.css):
   header graphite #18191c · page charcoal #212327 · cards #2b2d33 · hover #33363c · lines #3d4047 · text #ececee · muted #a8acb3.
   html[data-theme=dark] is set before the first paint (header.tpl) from the visitor's choice (روشن / تیره / خودکار).
   Black buttons turn white with black text; product colours lift for contrast; the black footer stays. */

html[data-theme='dark'] {
  color-scheme: dark;
  --sarv-ink: #ececee;
  --sarv-muted: #a8acb3;
  --sarv-line: #3d4047;
  --sarv-soft: #33363c;
  --sarv-bg: #212327;
  --sarv-header: #18191c;
  --sarv-surface: #2b2d33;
  --io-accent: #f2f2f2;
  --io-accent-hover: #ffffff;
  --io-accent-text: #111111;
  --io-soft: #33363c;
  --io-ink: #f2f2f2;
  --io-ring: 0 0 0 3px #212327, 0 0 0 5px #b58cf0;
  --c-ink: #ececee; --c-muted: #a8acb3; --c-line: #3d4047; --c-soft: #33363c; --c-card: #2b2d33;
  --c-hosting: #6aa9ef;   --c-hosting-soft: #12233a;
  --c-cloud: #22a3c4;     --c-cloud-soft: #0d2a31;
  --c-vps: #8b85f5;       --c-vps-soft: #1d1b45;
  --c-dedicated: #7d95dd; --c-dedicated-soft: #151d36;
  --c-domain: #4fc06a;    --c-domain-soft: #11291a;
  --c-site: #b58cf0;      --c-site-soft: #2a1d3b;
  --c-seo: #e7b43a;       --c-seo-soft: #33290f;
  --c-online: #f59a5b;    --c-online-soft: #3a2414;
}

/* page, header, menus */
html[data-theme='dark'] body,
html[data-theme='dark'] #main-body,
html[data-theme='dark'] section#main-body { background: #212327 !important; color: #ececee; }
html[data-theme='dark'] header.header,
html[data-theme='dark'] header.header .navbar,
html[data-theme='dark'] header.header .main-navbar-wrapper,
html[data-theme='dark'] .master-breadcrumb { background: #18191c !important; border-color: #3d4047 !important; }
html[data-theme='dark'] .breadcrumb { background: transparent; }
html[data-theme='dark'] .breadcrumb-item, html[data-theme='dark'] .breadcrumb-item a, html[data-theme='dark'] .breadcrumb-item.active { color: #a8acb3; }
html[data-theme='dark'] .navbar a, html[data-theme='dark'] .navbar .nav-link, html[data-theme='dark'] .navbar-brand { color: #ececee !important; }
html[data-theme='dark'] .dropdown-menu, html[data-theme='dark'] .sm-acc-panel, html[data-theme='dark'] .popover { background: #2b2d33; border-color: #3d4047; color: #ececee; }
html[data-theme='dark'] .dropdown-item, html[data-theme='dark'] .sm-acc-panel a { color: #ececee; }
html[data-theme='dark'] .dropdown-item:hover, html[data-theme='dark'] .dropdown-item:focus, html[data-theme='dark'] .sm-acc-panel a:hover { background: #33363c; color: #fff; }
html[data-theme='dark'] .dropdown-divider { border-color: #3d4047; }

/* text */
html[data-theme='dark'] h1, html[data-theme='dark'] h2, html[data-theme='dark'] h3, html[data-theme='dark'] h4,
html[data-theme='dark'] h5, html[data-theme='dark'] h6, html[data-theme='dark'] .h3, html[data-theme='dark'] strong, html[data-theme='dark'] b { color: #ececee; }
html[data-theme='dark'] .text-muted, html[data-theme='dark'] small, html[data-theme='dark'] .small, html[data-theme='dark'] .help-block,
html[data-theme='dark'] .form-text { color: #a8acb3 !important; }
html[data-theme='dark'] .text-dark, html[data-theme='dark'] .text-body { color: #ececee !important; }
html[data-theme='dark'] a { color: #f2f2f2; }
html[data-theme='dark'] hr { border-color: #3d4047; }
html[data-theme='dark'] code, html[data-theme='dark'] pre { background: #33363c; color: #ececee; border-color: #3d4047; }

/* surfaces: cards, panels, lists, wells, modals */
html[data-theme='dark'] .card, html[data-theme='dark'] .panel, html[data-theme='dark'] .well, html[data-theme='dark'] .modal-content,
html[data-theme='dark'] .list-group-item, html[data-theme='dark'] .bg-white, html[data-theme='dark'] .tile,
html[data-theme='dark'] .card-header, html[data-theme='dark'] .card-footer, html[data-theme='dark'] .panel-heading, html[data-theme='dark'] .panel-footer,
html[data-theme='dark'] .client-home-cards .card, html[data-theme='dark'] .card-sidebar { background: #2b2d33 !important; border-color: #3d4047 !important; color: #ececee; }
html[data-theme='dark'] .bg-light, html[data-theme='dark'] .bg-default, html[data-theme='dark'] .jumbotron { background: #33363c !important; color: #ececee; }
html[data-theme='dark'] .list-group-item-action:hover, html[data-theme='dark'] .list-group-item.active { background: #33363c !important; color: #fff !important; }
html[data-theme='dark'] .modal-header, html[data-theme='dark'] .modal-footer { border-color: #3d4047; }
html[data-theme='dark'] .close { color: #ececee; text-shadow: none; }
html[data-theme='dark'] .border, html[data-theme='dark'] .border-top, html[data-theme='dark'] .border-bottom { border-color: #3d4047 !important; }

/* forms */
html[data-theme='dark'] .form-control, html[data-theme='dark'] .custom-select, html[data-theme='dark'] select,
html[data-theme='dark'] textarea, html[data-theme='dark'] input[type='text'], html[data-theme='dark'] input[type='email'],
html[data-theme='dark'] input[type='password'], html[data-theme='dark'] input[type='tel'], html[data-theme='dark'] input[type='number'],
html[data-theme='dark'] input[type='search'], html[data-theme='dark'] .field { background: #1c1d21 !important; color: #ececee !important; border-color: #4a4e56 !important; }
html[data-theme='dark'] .form-control::placeholder, html[data-theme='dark'] input::placeholder { color: #80858d; }
html[data-theme='dark'] .form-control:focus { border-color: #b58cf0 !important; box-shadow: 0 0 0 3px rgba(181, 140, 240, .25) !important; }
html[data-theme='dark'] .form-control:disabled, html[data-theme='dark'] .form-control[readonly] { background: #2b2d33 !important; color: #a8acb3 !important; }
html[data-theme='dark'] .input-group-text, html[data-theme='dark'] .input-group-addon { background: #33363c; color: #ececee; border-color: #4a4e56; }
html[data-theme='dark'] label, html[data-theme='dark'] .form-control-label, html[data-theme='dark'] .control-label { color: #ececee; }
html[data-theme='dark'] .iti__country-list { background: #2b2d33; border-color: #3d4047; }
html[data-theme='dark'] .iti__country.iti__highlight { background: #33363c; }

/* buttons: black ones turn white (with black text), outlines lighten */
html[data-theme='dark'] .btn-primary, html[data-theme='dark'] .btn-success, html[data-theme='dark'] .btn-dark,
html[data-theme='dark'] #order-standard_cart .btn-primary, html[data-theme='dark'] #order-standard_cart .btn-success,
html[data-theme='dark'] #order-standard_cart .btn-checkout, html[data-theme='dark'] #order-standard_cart .btn-info,
html[data-theme='dark'] #order-standard_cart .btn-order-now:not(.sarv-plan-btn), html[data-theme='dark'] .sarv-btn-user { background: #f2f2f2 !important; border-color: #f2f2f2 !important; color: #111 !important; }
html[data-theme='dark'] .btn-primary:hover, html[data-theme='dark'] .btn-success:hover, html[data-theme='dark'] .sarv-btn-user:hover,
html[data-theme='dark'] #order-standard_cart .btn-primary:hover, html[data-theme='dark'] #order-standard_cart .btn-checkout:hover { background: #ffffff !important; border-color: #ffffff !important; color: #000 !important; }
html[data-theme='dark'] .btn-primary .si, html[data-theme='dark'] .sarv-btn-user .si, html[data-theme='dark'] .btn-primary svg { color: #111 !important; }
html[data-theme='dark'] .btn-default, html[data-theme='dark'] .btn-secondary, html[data-theme='dark'] .btn-light,
html[data-theme='dark'] .btn-outline-dark, html[data-theme='dark'] .btn-outline-secondary, html[data-theme='dark'] .btn-outline-primary { background: transparent !important; color: #ececee !important; border-color: #5a5e66 !important; }
html[data-theme='dark'] .btn-default:hover, html[data-theme='dark'] .btn-secondary:hover, html[data-theme='dark'] .btn-light:hover,
html[data-theme='dark'] .btn-outline-dark:hover, html[data-theme='dark'] .btn-outline-secondary:hover { background: #33363c !important; color: #fff !important; }
html[data-theme='dark'] .btn-link { color: #ececee !important; }

/* tables */
html[data-theme='dark'] .table, html[data-theme='dark'] table { color: #ececee; }
html[data-theme='dark'] .table th, html[data-theme='dark'] .table td, html[data-theme='dark'] .table thead th { border-color: #3d4047 !important; }
html[data-theme='dark'] .table thead th, html[data-theme='dark'] table.dataTable thead th { background: #33363c !important; color: #ececee !important; }
html[data-theme='dark'] .table-striped tbody tr:nth-of-type(odd) { background: rgba(255, 255, 255, .03); }
html[data-theme='dark'] .table-hover tbody tr:hover, html[data-theme='dark'] table.dataTable tbody tr:hover { background: #33363c !important; }
html[data-theme='dark'] table.dataTable tbody tr, html[data-theme='dark'] .dataTables_wrapper { background: transparent !important; color: #ececee; }
html[data-theme='dark'] .page-link { background: #2b2d33; border-color: #3d4047; color: #ececee; }
html[data-theme='dark'] .page-item.active .page-link { background: #f2f2f2; border-color: #f2f2f2; color: #111; }

/* alerts: dark tinted, readable */
html[data-theme='dark'] .alert-info { background: #12233a; border-color: #1d3a5f; color: #cfe3fb; }
html[data-theme='dark'] .alert-success { background: #11291a; border-color: #1d4a2c; color: #c8ecd2; }
html[data-theme='dark'] .alert-warning { background: #33290f; border-color: #5a4714; color: #f6e2b0; }
html[data-theme='dark'] .alert-danger { background: #3a1416; border-color: #6a2226; color: #f8cfd1; }
html[data-theme='dark'] .alert a { color: inherit; text-decoration: underline; }

/* order form (sarv_cart) */
html[data-theme='dark'] #order-standard_cart .products .product,
html[data-theme='dark'] #order-standard_cart .products .product header,
html[data-theme='dark'] #order-standard_cart .product-info, html[data-theme='dark'] #order-standard_cart .field-container,
html[data-theme='dark'] #order-standard_cart .order-summary, html[data-theme='dark'] #order-standard_cart .summary-container,
html[data-theme='dark'] #order-standard_cart .view-cart-items, html[data-theme='dark'] #order-standard_cart .view-cart-items-header,
html[data-theme='dark'] #order-standard_cart .domain-checker-container, html[data-theme='dark'] #order-standard_cart .suggested-domains,
html[data-theme='dark'] #order-standard_cart .domain-suggestion, html[data-theme='dark'] #order-standard_cart .panel-addon,
html[data-theme='dark'] .sarv-dom, html[data-theme='dark'] .sarv-ns, html[data-theme='dark'] .sarv-reg-trust { background: #2b2d33 !important; border-color: #3d4047 !important; color: #ececee; }
html[data-theme='dark'] #order-standard_cart .view-cart-items .item:nth-child(even) { background: #2f3137; }
html[data-theme='dark'] #order-standard_cart .order-summary h2, html[data-theme='dark'] #order-standard_cart .summary-container .total-due-today { background: #33363c !important; color: #ececee !important; }
html[data-theme='dark'] .sarv-plan-code { background: #33363c; border-color: #4a4e56; color: #ececee; }
html[data-theme='dark'] .sarv-addon.is-on { background: #13261a; border-color: #4fc06a; }
html[data-theme='dark'] .sarv-addon.is-on::after { background-color: #4fc06a; border-color: #4fc06a; }
html[data-theme='dark'] .sarv-addon::after { background-color: #1c1d21; border-color: #5a5e66; }
html[data-theme='dark'] .sarv-addon-price.is-free, html[data-theme='dark'] .sarv-dom-ok { color: #6fd389; }
html[data-theme='dark'] .sarv-addon-price.is-free { background: #13261a; }
html[data-theme='dark'] .sarv-dom-ico, html[data-theme='dark'] .sarv-addon.is-on .sarv-addon-ico { color: #6fd389; background: #13261a; }
html[data-theme='dark'] .sarv-dom-remove { color: #ff8a8a; border-color: #4a4e56; }
html[data-theme='dark'] .sarv-dom-remove:hover { background: #3a1416; }
html[data-theme='dark'] .sarv-dom-hosting a, html[data-theme='dark'] .sarv-ns-edit { color: #6aa9ef; }

/* images that are black-on-transparent (logos): the white logo is swapped in by CSS below */
html[data-theme='dark'] .sarv-logo-light { display: none !important; }
html .sarv-logo-dark { display: none !important; }
html[data-theme='dark'] .sarv-logo-dark { display: inline-block !important; }

/* trust badges keep their white tiles (issued artwork on white) */
html[data-theme='dark'] .stb-badge { background: #fff !important; }

/* theme switch button (header) */
.sarv-theme-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--sarv-line, #e3e8e5); border-radius: 12px; background: transparent; color: var(--sarv-ink, #111); cursor: pointer; }
.sarv-theme-btn:hover { background: var(--sarv-soft, #f4f7f5); }
.sarv-theme-btn svg { width: 20px; height: 20px; }
.sarv-theme-btn .t-sun, html[data-theme='dark'] .sarv-theme-btn .t-moon { display: none !important; }
html[data-theme='dark'] .sarv-theme-btn svg.t-sun { display: block !important; }
html[data-theme='dark'] .sarv-theme-row .sarv-theme-lbl b.t-sun { display: inline !important; }

/* order form keeps its own colour variables on #order-standard_cart: give it the dark ones there */
html[data-theme='dark'] #order-standard_cart { --c-ink: #ececee; --c-muted: #a8acb3; --c-line: #3d4047; --c-soft: #33363c; --c-card: #2b2d33; --c-ok: #4fc06a; --c-bad: #ff8a8a; color: #ececee; }
html[data-theme='dark'] #order-standard_cart h1, html[data-theme='dark'] #order-standard_cart h2, html[data-theme='dark'] #order-standard_cart h3,
html[data-theme='dark'] #order-standard_cart .header-lined h1, html[data-theme='dark'] #order-standard_cart .font-size-36 { color: #ececee !important; }
html[data-theme='dark'] #order-standard_cart .header-lined p, html[data-theme='dark'] #order-standard_cart p { color: #c4c7cc; }
/* country tabs */
html[data-theme='dark'] .sarv-region { background: #1c1d21; }
html[data-theme='dark'] .sarv-region a { color: #c4c7cc; }
html[data-theme='dark'] .sarv-region a:hover { color: #fff; background: #33363c; }
html[data-theme='dark'] .sarv-region a.on { background: #33363c; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
/* panel / login button: white with black text */
html[data-theme='dark'] header.header .btn.sarv-btn-user, html[data-theme='dark'] header.header .sarv-btn-user,
html[data-theme='dark'] header.header .sarv-btn-user:hover { background: #f2f2f2 !important; color: #111 !important; }
html[data-theme='dark'] header.header .sarv-btn-user:hover { background: #fff !important; }
html[data-theme='dark'] header.header .sarv-btn-user .si { color: #111 !important; }
/* the switch inside the phone / tablet menu: a full-width row */
.sarv-theme-btn.sarv-theme-row { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; min-height: 48px; padding: 0 var(--sp-4, 16px); margin-top: var(--sp-2, 8px); justify-content: flex-start; font: inherit; font-weight: 700; }
.sarv-theme-row .sarv-theme-lbl b { font-weight: 800; }
/* header menu (sarv-menu.tpl): panels dark, buttons inside keep their own text colour */
html[data-theme='dark'] .sm-panel { background: #2b2d33 !important; border-color: #3d4047 !important; box-shadow: 0 16px 40px rgba(0, 0, 0, .45) !important; }
html[data-theme='dark'] .sm-panel .sm-item:hover { background: #33363c; }
html[data-theme='dark'] .sm-panel .sm-item small, html[data-theme='dark'] .sm-panel .sm-item p { color: #a8acb3 !important; }
html[data-theme='dark'] .navbar a.btn-primary, html[data-theme='dark'] .sm-auth a.btn-primary, html[data-theme='dark'] .sm-auth .btn-primary .si { color: #111 !important; }
html[data-theme='dark'] .sm-auth .btn-outline-dark, html[data-theme='dark'] .sm-auth .btn-default { color: #ececee !important; }
