/* Prime Social Emerald Turquoise theme.
   Full-site light emerald-turquoise appearance.
   No black sections. High-contrast readable text everywhere.
   Keep logos, status colors and payment actions intact. */

html:root:not([data-theme="light"]) {
 --rescue-bg:#F5F7FB;--rescue-top:#F8FAFC;--rescue-card:#FFFFFF;
 --rescue-field:#FCFDFF;--rescue-text:#1E293B;--rescue-muted:#64748B;
 --rescue-border:#E2E8F0;--rescue-accent:#2563EB;--rescue-accent-2:#3B82F6;
 --rescue-tint:#F5F7FB;color-scheme:light;
 --prime-bg:var(--rescue-bg);--prime-bg-2:var(--rescue-top);
 --prime-surface:var(--rescue-card);--prime-surface-2:var(--rescue-tint);
 --prime-field:var(--rescue-field);--prime-text:var(--rescue-text);
 --prime-text-2:var(--rescue-muted);--prime-muted:var(--rescue-muted);
 --fo-panel:var(--rescue-card);--fo-panel-2:var(--rescue-tint);
 --fo-text:var(--rescue-text);--fo-muted:var(--rescue-muted);
 --fo-orange:var(--rescue-accent);--fo-orange-2:var(--rescue-accent-2);
 --bg-deep:var(--rescue-bg);--bg-primary:var(--rescue-bg);--bg-card:var(--rescue-card);
 --text-primary:var(--rescue-text);--text-secondary:var(--rescue-muted);
 --border:var(--rescue-border);--gradient-btn:linear-gradient(135deg,var(--rescue-accent),var(--rescue-accent-2));
}
html:root[data-theme="light"] {
 --rescue-bg:#F5F7FB;--rescue-top:#FCFDFF;--rescue-card:#FFFFFF;
 --rescue-field:#FCFDFF;--rescue-text:#1E293B;--rescue-muted:#64748B;
 --rescue-border:#E2E8F0;--rescue-accent:#2563EB;--rescue-accent-2:#3B82F6;
 --rescue-tint:#F8FAFC;color-scheme:light;
 --prime-bg:var(--rescue-bg);--prime-bg-2:var(--rescue-top);
 --prime-surface:var(--rescue-card);--prime-surface-2:var(--rescue-tint);
 --prime-field:var(--rescue-field);--prime-text:var(--rescue-text);
 --prime-text-2:var(--rescue-muted);--prime-muted:var(--rescue-muted);
 --fo-panel:var(--rescue-card);--fo-panel-2:var(--rescue-tint);
 --fo-text:var(--rescue-text);--fo-muted:var(--rescue-muted);
 --fo-orange:var(--rescue-accent);--fo-orange-2:var(--rescue-accent-2);
 --bg-deep:var(--rescue-bg);--bg-primary:var(--rescue-bg);--bg-card:var(--rescue-card);
 --text-primary:var(--rescue-text);--text-secondary:var(--rescue-muted);
 --border:var(--rescue-border);--gradient-btn:linear-gradient(135deg,var(--rescue-accent),var(--rescue-accent-2));
}

/* Main page surface: never black in either selected palette. */
html:root body, html:root body.page-new-order, html:root body.admin-body,
html:root .wrap, html:root .pg-store, html:root .pg-admin {
 background:var(--rescue-bg)!important;background-image:none!important;
 color:var(--rescue-text)!important;color-scheme:light!important;
}
html:root body.page-new-order .xo-wrap {background:transparent!important;background-image:none!important;color:var(--rescue-text)!important;}
html:root body .header, html:root body .adm-topbar,
html:root body .bottom-nav, html:root body .footer,
html:root body .sidebar,html:root body .mobile-menu,
html:root body .prime-drawer,html:root body .adm-sidebar {
 background:var(--rescue-top)!important;background-image:none!important;
 color:var(--rescue-text)!important;border-color:var(--rescue-border)!important;
 box-shadow:0 3px 14px rgba(30,41,59,.07)!important;
}
html:root body.page-new-order .plat-card,
html:root body.page-new-order .xo-card,
html:root body.page-new-order .xo-form,
html:root body.page-new-order .fo-service-details,
html:root body.page-new-order .fo-details-head,
html:root body.page-new-order .xo-info-card,
html:root body.page-new-order .service-details-card,
html:root body.page-new-order .service-details-box,
html:root body.page-new-order .service-spec-card,
html:root body .card, html:root body .sidebar-card,html:root body .gateway-card,
html:root body .profile-card,html:root body .account-ref-card,
html:root body .adm-section,html:root body .adm-server,html:root body .dash-card,
html:root body .pg-card,html:root body .pg-receipt {
 background:var(--rescue-card)!important;background-image:none!important;
 color:var(--rescue-text)!important;border-color:var(--rescue-border)!important;
 box-shadow:0 6px 24px rgba(30,41,59,.07)!important;
}
html:root body.page-new-order .xo-card-head,
html:root body .account-ref-card-head,
html:root body .adm-table thead th {
 background:var(--rescue-tint)!important;background-image:none!important;
 color:var(--rescue-text)!important;border-color:var(--rescue-border)!important;
}
html:root body.page-new-order .cat-picker,html:root body.page-new-order .svc-picker,
html:root body.page-new-order .svc-list,html:root body.page-new-order .search-results,
html:root body.page-new-order .cat-item,html:root body.page-new-order .svc-item {
 background:var(--rescue-card)!important;background-image:none!important;
 color:var(--rescue-text)!important;border-color:var(--rescue-border)!important;
}
html:root body.page-new-order .cat-item:hover,
html:root body.page-new-order .svc-item:hover,
html:root body.page-new-order .cat-item.active,
html:root body.page-new-order .svc-item.selected {
 background:var(--rescue-tint)!important;color:var(--rescue-text)!important;
 border-color:var(--rescue-accent)!important;
}
html:root body.page-new-order .search-box input,
html:root body.page-new-order .xo-input,
html:root body.page-new-order .xo-select,
html:root body.page-new-order .xo-readonly,
html:root body.page-new-order .cat-trigger,
html:root body.page-new-order .svc-trigger,
html:root body.page-new-order input:not([type=checkbox]):not([type=radio]):not([type=file]),
html:root body.page-new-order textarea,html:root body.page-new-order select,
html:root body .form-control {
 background:var(--rescue-field)!important;background-image:none!important;
 color:var(--rescue-text)!important;border-color:var(--rescue-border)!important;
 color-scheme:light!important;
}
html:root body.page-new-order .xo-field label,html:root body.page-new-order .cat-trigger-inner,
html:root body.page-new-order #catTriggerText,html:root body.page-new-order #svcTriggerText,
html:root body.page-new-order .cat-item .c-name,html:root body.page-new-order .svc-item-name,
html:root body.page-new-order .xo-info-item strong,
html:root body .logo-title, html:root body .pg-card h1,html:root body .pg-card h2 {
 color:var(--rescue-text)!important;
}
html:root body.page-new-order .xo-hint,html:root body.page-new-order .placeholder,
html:root body.page-new-order .svc-item .smeta,html:root body .bottom-nav a {
 color:var(--rescue-muted)!important;
}
html:root body.page-new-order input::placeholder,html:root body.page-new-order textarea::placeholder {color:var(--rescue-muted)!important;opacity:.82!important;}
html:root body .balance-pill, html:root body .currency-switch>button,
html:root body .mobile-menu-btn {background:var(--rescue-card)!important;color:var(--rescue-text)!important;border-color:var(--rescue-border)!important;}
html:root body.page-new-order .xo-new-order-btn,
html:root body.page-new-order .xo-submit,
html:root body .btn-primary,html:root body .bn-center,html:root body .pg-button {
 background:linear-gradient(135deg,var(--rescue-accent),var(--rescue-accent-2))!important;
 color:#fff!important;border-color:transparent!important;
}
/* Keep help/Telegram/WhatsApp slides and network icons in their existing brand colors. */
/* Restore visible, bounded theme control even when old CSS hides it. */
html:root body .header-left>button[data-prime-theme-toggle],
html:root body .header-left>button.prime-pastel-switch {
 display:inline-flex!important;visibility:visible!important;opacity:1!important;
 flex:0 0 38px!important;align-items:center!important;justify-content:center!important;
 width:38px!important;height:38px!important;min-width:38px!important;max-width:38px!important;
 min-height:38px!important;max-height:38px!important;overflow:hidden!important;
 position:relative!important;inset:auto!important;transform:none!important;
 background:var(--rescue-card)!important;background-image:none!important;
 color:var(--rescue-accent)!important;border:1px solid var(--rescue-border)!important;
 border-radius:12px!important;padding:8px!important;cursor:pointer!important;
}
html:root body button[data-prime-theme-toggle] svg,html:root body button.prime-pastel-switch svg{width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important;min-width:20px!important;min-height:20px!important;}
html:root[data-theme="light"] body button[data-prime-theme-toggle] .prime-theme-moon{display:block!important;}
html:root[data-theme="light"] body button[data-prime-theme-toggle] .prime-theme-sun{display:none!important;}
html:root:not([data-theme="light"]) body button[data-prime-theme-toggle] .prime-theme-sun{display:block!important;}
html:root:not([data-theme="light"]) body button[data-prime-theme-toggle] .prime-theme-moon{display:none!important;}
html:root body .header-left>button[data-prime-theme-toggle] .prime-theme-button-text{display:none!important;}
@media(max-width:650px){html:root body .header-left>button[data-prime-theme-toggle]{flex:0 0 34px!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important;padding:6px!important;}}


/* Prime Social Softfix v6: never allow black surfaces or low-contrast text. */
html:root body :is(.mobile-menu.prime-drawer,.prime-drawer-top,.prime-drawer-nav,.prime-menu-group,.prime-menu-items,.adm-sidebar,.sidebar){
  background:var(--rescue-top)!important;
  background-image:none!important;
  color:var(--rescue-text)!important;
  border-color:var(--rescue-border)!important;
}
html:root body :is(.prime-user-card,.prime-menu-group-head,.prime-menu-items a,.prime-drawer-bottom-links a,.prime-user-balance,.currency-menu,.currency-menu a,.lang-switch a,.balance-pill,.currency-switch>button){
  background:var(--rescue-card)!important;
  background-image:none!important;
  color:var(--rescue-text)!important;
  border-color:var(--rescue-border)!important;
  box-shadow:none!important;
}
html:root body .prime-user-card{background:linear-gradient(180deg,var(--rescue-card),var(--rescue-tint))!important;}
html:root body :is(.prime-brand-copy strong,.prime-user-name,.prime-menu-title,.prime-menu-group-label,.logo-title,.logo-sub,.header .nav-link,.prime-drawer-brand,.prime-menu-items a.current,.prime-menu-items a:hover,.prime-menu-group.open>.prime-menu-group-head,.prime-drawer-bottom-links a:hover,.prime-drawer-bottom-links a.logout,.xo-field label,.service-details-card h3,.service-details-card h4,.service-details-card strong,.fo-service-details h3,.fo-service-details h4){
  color:var(--rescue-text)!important;
}
html:root body :is(.prime-brand-copy small,.prime-user-email,.prime-menu-items a i,.prime-drawer-bottom-links a i,.prime-drawer-bottom-links a span,.prime-menu-head-icon,.prime-menu-chevron,.header .nav-link:not(.active),.xo-hint,.svc-item .smeta,.service-details-card p,.service-details-card li,.fo-service-details p,.fo-service-details li,.bottom-nav a){
  color:var(--rescue-muted)!important;
}
html:root body :is(.prime-menu-items a.current,.prime-menu-items a:hover,.prime-menu-group.open>.prime-menu-group-head,.prime-drawer-bottom-links a:hover,.bottom-nav a.active){
  background:var(--rescue-tint)!important;
  color:var(--rescue-accent)!important;
}
html:root body .bottom-nav{background:var(--rescue-top)!important;}
html:root body .bottom-nav .bn-center{background:linear-gradient(135deg,var(--rescue-accent),var(--rescue-accent-2))!important;color:#fff!important;border-color:transparent!important;}
html:root body :is(.search-box input,.xo-input,.xo-select,.cat-trigger,.svc-trigger,.xo-readonly,.form-control,.form-select,.account-input,.account-select,.account-textarea,textarea,select,input:not([type=checkbox]):not([type=radio]):not([type=file])){
  background:var(--rescue-field)!important;
  color:var(--rescue-text)!important;
  border-color:var(--rescue-border)!important;
}
html:root body :is(input::placeholder,textarea::placeholder,.placeholder){color:var(--rescue-muted)!important;opacity:.9!important;}
html:root body :is(.xo-card,.plat-card,.card,.sidebar-card,.gateway-card,.account-ref-card,.service-details-card,.service-spec-card,.fo-service-details,.fo-details-head,.fo-banner,.pg-card,.dash-card,.adm-section,.stat-box,.profile-card){
  background:var(--rescue-card)!important;
  color:var(--rescue-text)!important;
  border-color:var(--rescue-border)!important;
  box-shadow:0 6px 24px rgba(31,45,71,.07)!important;
}
html:root body .xo-card-head{background:var(--rescue-tint)!important;color:var(--rescue-text)!important;border-color:var(--rescue-border)!important;}
html:root body :is(.cat-item,.svc-item,.cat-picker,.svc-list,.search-results,.xo-info-card,.xo-info-notes,.xo-desc,.service-details-box,.service-details-reference,.service-spec){
  background:var(--rescue-field)!important;
  color:var(--rescue-text)!important;
  border-color:var(--rescue-border)!important;
}
html:root body :is(.cat-item.active,.svc-item.selected,.cat-item:hover,.svc-item:hover,.search-hit:hover){
  background:var(--rescue-tint)!important;
  color:var(--rescue-text)!important;
  border-color:var(--rescue-accent)!important;
}
html:root body :is(.header,.adm-topbar,.footer,.mobile-menu,.prime-drawer,.adm-sidebar,.sidebar){
  background:var(--rescue-top)!important;
  color:var(--rescue-text)!important;
}
html:root body :is(.header .container,.header-inner){background:transparent!important;}


/* Emerald readable action buttons */
html:root body :is(.btn-primary,.btn.btn-primary,.xo-submit,.prime-action-btn,.submit-btn,.shop-now-btn,.pay-btn,.wallet-btn,.new-order-btn,.account-btn,.prime-btn-primary){
  background:linear-gradient(135deg,var(--rescue-accent),var(--rescue-accent-2))!important;
  color:#ffffff!important;
  border-color:transparent!important;
}
html:root body :is(.btn-primary:hover,.btn.btn-primary:hover,.xo-submit:hover,.prime-action-btn:hover,.submit-btn:hover,.shop-now-btn:hover,.pay-btn:hover,.wallet-btn:hover,.new-order-btn:hover,.account-btn:hover,.prime-btn-primary:hover){
  filter:brightness(0.97)!important;
}
html:root body :is(.btn,.xo-submit,.prime-action-btn,.submit-btn,.shop-now-btn,.pay-btn,.wallet-btn,.new-order-btn,.account-btn,.prime-btn-primary){
  font-weight:700!important;
}


/* Prime Social / emerald readability refinements v2 — visual-only.
   Both appearance settings stay light; no black backgrounds or washed-out text.
   Designed for the compact left-side mobile drawer. */
html:root:not([data-theme="light"]){
  --rescue-bg:#F5F7FB;--rescue-top:#EFF4FC;--rescue-card:#FFFFFF;
  --rescue-field:#FAFCFF;--rescue-text:#1E293B;--rescue-muted:#64748B;
  --rescue-border:#D9E3F0;--rescue-accent:#2563EB;--rescue-accent-2:#2563EB;
  --rescue-tint:#F1F5F9;
  --prime-soft:#F1F5F9;--prime-blue:#2563EB;--prime-blue-2:#2563EB;
}
html:root[data-theme="light"]{
  --rescue-bg:#F5F7FB;--rescue-top:#FCFDFF;--rescue-card:#FFFFFF;
  --rescue-field:#FCFDFF;--rescue-text:#1E293B;--rescue-muted:#64748B;
  --rescue-border:#D9E3F0;--rescue-accent:#2563EB;--rescue-accent-2:#2563EB;
  --rescue-tint:#EFF4FC;
  --prime-soft:#EFF4FC;--prime-blue:#2563EB;--prime-blue-2:#2563EB;
}
html:root body .mobile-menu.prime-drawer{
  background:var(--rescue-top)!important;background-image:none!important;
  border-inline-end:1px solid var(--rescue-border)!important;
  color:var(--rescue-text)!important;
  box-shadow:12px 0 36px rgba(30,41,59,.12)!important;
}
html:root body .prime-drawer-top{background:transparent!important;}
html:root body .prime-brand-copy strong,html:root body .prime-user-name,
html:root body .prime-menu-group .prime-menu-title,
html:root body .prime-menu-items a,html:root body .prime-menu-items a span,
html:root body .prime-drawer-bottom-links a,html:root body .prime-drawer-bottom-links a span{
  color:var(--rescue-text)!important;opacity:1!important;
}
html:root body .prime-brand-copy small,html:root body .prime-user-email,
html:root body .prime-user-label{
  color:var(--rescue-muted)!important;opacity:1!important;
}
html:root body .prime-menu-group-head{
  color:var(--rescue-text)!important;background:var(--rescue-card)!important;
  border:1px solid var(--rescue-border)!important;border-radius:12px!important;
}
html:root body .prime-menu-group.open>.prime-menu-group-head,
html:root body .prime-menu-group-head:hover,
html:root body .prime-menu-items a.current,html:root body .prime-menu-items a:hover,
html:root body .prime-menu-items a:focus-visible{
  background:var(--rescue-tint)!important;color:var(--rescue-text)!important;
}
html:root body .prime-menu-items{
  background:var(--rescue-card)!important;color:var(--rescue-text)!important;
  border-radius:0 0 10px 10px!important;
}
html:root body .prime-menu-items::before{
  background:var(--rescue-tint)!important;opacity:1!important;
  border:1px solid var(--rescue-border)!important;box-sizing:border-box!important;
}
html:root body .prime-menu-items a i,
html:root body .prime-drawer-bottom-links a i{
  color:#475569!important;opacity:1!important;
}
html:root body .prime-menu-head-icon{
  background:var(--rescue-accent)!important;color:#FFFFFF!important;
  border:4px solid var(--rescue-border)!important;
  box-shadow:0 3px 8px rgba(37,99,235,.12)!important;
}
html:root body .prime-menu-chevron{
  background:var(--rescue-tint)!important;color:var(--rescue-text)!important;
  border:1px solid var(--rescue-border)!important;
}
html:root body .prime-user-card{
  background:var(--rescue-card)!important;background-image:none!important;
  border:1px solid var(--rescue-border)!important;
  box-shadow:0 4px 16px rgba(30,41,59,.07)!important;
}
html:root body .prime-user-balance{
  background:var(--rescue-tint)!important;background-image:none!important;
  border:1px solid var(--rescue-border)!important;
  color:var(--rescue-text)!important;
}
html:root body .prime-user-avatar{background:var(--rescue-tint)!important;}
html:root body .prime-brand-mark,html:root body .prime-drawer-close{
  background:var(--rescue-accent)!important;color:#FFFFFF!important;
  border-color:var(--rescue-border)!important;
}
html:root body .prime-menu-items a.current,html:root body .prime-menu-items a.current i,
html:root body .prime-menu-items .prime-admin-link,
html:root body .prime-menu-items .prime-admin-link i,
html:root body .prime-drawer-bottom-links a.logout{
  color:#2563EB!important;
}
html:root body .prime-menu-items .prime-admin-link{
  background:var(--rescue-tint)!important;border-color:var(--rescue-border)!important;
}
html:root body .prime-drawer-bottom-links{border-color:var(--rescue-border)!important;}
html:root body .prime-drawer-bottom-links a{
  background:var(--rescue-card)!important;
  border-radius:10px!important;
}
html:root body .overlay.show{
  background:rgba(30,41,59,.23)!important;
  backdrop-filter:blur(1px)!important;
}
html:root body :is(.xo-submit,.xo-new-order-btn,.btn-primary,.bn-center,.pg-button:not(.pg-secondary)){
  background:linear-gradient(135deg,var(--rescue-accent),var(--rescue-accent-2))!important;
  color:#FFFFFF!important;
}
html:root body :is(.xo-submit,.xo-new-order-btn,.btn-primary,.bn-center,.pg-button:not(.pg-secondary)):disabled{
  background:#E4EBF5!important;color:#64748B!important;
  border-color:var(--rescue-border)!important;opacity:1!important;
}
html:root body :is(.xo-field label,.cat-item,.svc-item,.svc-item-name,.cat-trigger,
  .svc-trigger,.service-details-card,.service-details-box,.xo-info-card,.pg-card,
  .adm-section,.adm-nav a,.mobile-menu-btn,.bottom-nav a){
  color:var(--rescue-text)!important;
}
html:root body :is(.xo-hint,.svc-item .smeta,.form-hint,.service-details-card p,
  .service-details-card li,.pg-help,.pg-description,.bottom-nav a:not(.active)){
  color:var(--rescue-muted)!important;opacity:1!important;
}
html:root body :is(input::placeholder,textarea::placeholder){
  color:var(--rescue-muted)!important;opacity:1!important;
}

/* Final canvas override outranks legacy full-page hardcoded palettes. */
html[data-theme="dark"]:root,html[data-theme="dark"]:root body,
html[data-theme="dark"]:root body.page-new-order,
html[data-theme="dark"]:root body.admin-body,
html[data-theme="dark"]:root .wrap,html[data-theme="dark"]:root .pg-store,
html[data-theme="dark"]:root .pg-admin{
  background:#F5F7FB!important;background-image:none!important;color:#1E293B!important;
}
html[data-theme="light"]:root,html[data-theme="light"]:root body,
html[data-theme="light"]:root body.page-new-order,
html[data-theme="light"]:root body.admin-body,
html[data-theme="light"]:root .wrap,html[data-theme="light"]:root .pg-store,
html[data-theme="light"]:root .pg-admin{
  background:#F5F7FB!important;background-image:none!important;color:#1E293B!important;
}
