/* MorPay — ثيم عام للموقع (Dark افتراضي / Light اختياري) */

html[data-theme="light"] body.lp,
body.lp.theme-light {
  color: #1a1428;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(138, 43, 226, 0.1), transparent 55%),
    linear-gradient(180deg, #f5f2fb 0%, #efeaf8 45%, #f8f6fc 100%);
}

html[data-theme="light"] body.lp .lp-nav,
body.lp.theme-light .lp-nav {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(42, 17, 72, 0.08);
}

html[data-theme="light"] body.lp .lp-brand,
html[data-theme="light"] body.lp .lp-links a,
body.lp.theme-light .lp-brand,
body.lp.theme-light .lp-links a {
  color: #2a1148;
}

html[data-theme="light"] body.lp .lp-links a.is-on,
body.lp.theme-light .lp-links a.is-on {
  color: #2a1148;
}

html[data-theme="light"] body.lp .lp-profile,
body.lp.theme-light .lp-profile {
  color: #2a1148;
  border-color: rgba(42, 17, 72, 0.25);
}

html[data-theme="light"] body.lp .lp-btn-ghost,
body.lp.theme-light .lp-btn-ghost {
  color: #2a1148;
  border-color: rgba(42, 17, 72, 0.22);
}

html[data-theme="light"] body.lp .lp-btn-outline,
body.lp.theme-light .lp-btn-outline {
  color: #2a1148;
  border-color: rgba(42, 17, 72, 0.25);
}

html[data-theme="light"] body.lp .lp-hero h1,
body.lp.theme-light .lp-hero h1 {
  color: #1a0a32;
}

html[data-theme="light"] body.lp .lp-hero h1 span,
body.lp.theme-light .lp-hero h1 span {
  color: #c9a000;
  text-shadow: none;
}

html[data-theme="light"] body.lp .lp-hero p,
body.lp.theme-light .lp-hero p {
  color: rgba(26, 20, 40, 0.72);
  font-weight: 600;
}

html[data-theme="light"] body.lp .lp-section-head h2,
body.lp.theme-light .lp-section-head h2 {
  color: #1a0a32;
}

html[data-theme="light"] body.lp .lp-section-head h2 em,
body.lp.theme-light .lp-section-head h2 em {
  color: #c9a000;
}

html[data-theme="light"] body.lp .lp-section-head p,
body.lp.theme-light .lp-section-head p {
  color: rgba(26, 20, 40, 0.68);
  font-weight: 600;
}

html[data-theme="light"] body.lp .lp-step,
body.lp.theme-light .lp-step {
  background: #ffffff;
  border-color: rgba(42, 17, 72, 0.1);
  box-shadow: 0 10px 28px rgba(42, 17, 72, 0.08);
}

html[data-theme="light"] body.lp .lp-step h3,
body.lp.theme-light .lp-step h3 {
  color: #1a0a32;
  font-weight: 800;
}

html[data-theme="light"] body.lp .lp-step p,
body.lp.theme-light .lp-step p {
  color: rgba(26, 20, 40, 0.7);
  font-weight: 600;
}

html[data-theme="light"] body.lp .lp-node span,
body.lp.theme-light .lp-node span {
  color: #15803d;
  background: #ecfdf5;
}

html[data-theme="light"] body.lp .lp-node,
body.lp.theme-light .lp-node {
  background: #ffffff;
  border-color: rgba(42, 17, 72, 0.12);
  box-shadow: 0 12px 28px rgba(42, 17, 72, 0.1);
}

html[data-theme="light"] body.lp .lp-node strong,
body.lp.theme-light .lp-node strong {
  color: #1a0a32;
}

html[data-theme="light"] body.lp .lp-orbit::before,
body.lp.theme-light .lp-orbit::before {
  border-color: rgba(107, 43, 255, 0.25);
  box-shadow: none;
}

html[data-theme="light"] body.lp .lp-networks,
body.lp.theme-light .lp-networks {
  box-shadow: 0 12px 28px rgba(42, 17, 72, 0.1);
}

html[data-theme="light"] body.lp .lp-service,
body.lp.theme-light .lp-service {
  box-shadow: 0 14px 32px rgba(42, 17, 72, 0.12);
  color: #fff;
}

html[data-theme="light"] body.lp .lp-s2,
body.lp.theme-light .lp-s2 {
  background: linear-gradient(145deg, #7c3aed, #5b21b6 55%, #4c1d95);
}

html[data-theme="light"] body.lp .lp-cta-band,
body.lp.theme-light .lp-cta-band {
  background: linear-gradient(135deg, #3b1d6e 0%, #2a1148 55%, #1a0a32 100%);
  border: 1px solid rgba(253, 209, 0, 0.2);
}

html[data-theme="light"] body.lp .lp-cta-band h2,
html[data-theme="light"] body.lp .lp-cta-band p,
body.lp.theme-light .lp-cta-band h2,
body.lp.theme-light .lp-cta-band p {
  color: #fff;
  background: transparent;
}

html[data-theme="light"] body.lp .lp-menu-btn,
body.lp.theme-light .lp-menu-btn {
  color: #2a1148;
  border-color: rgba(42, 17, 72, 0.2);
}

html[data-theme="light"] body.lp .lp-links a.is-on,
body.lp.theme-light .lp-links a.is-on {
  box-shadow: inset 0 -2px 0 #c9a000;
}

/* أقسام عامة كانت لسه بلون أبيض باهت */
html[data-theme="light"] body.lp,
body.lp.theme-light {
  color: #1a1428;
}

html[data-theme="light"] body.lp .lp-section,
body.lp.theme-light .lp-section {
  color: #1a1428;
}

html[data-theme="light"] body.lp .lp-footer,
body.lp.theme-light .lp-footer {
  background: #efeaf8;
  border-top-color: rgba(42, 17, 72, 0.08);
  color: rgba(26, 20, 40, 0.7);
}

html[data-theme="light"] body.lp .lp-footer h4,
body.lp.theme-light .lp-footer h4 {
  color: #1a0a32;
}

html[data-theme="light"] body.lp .lp-footer a,
body.lp.theme-light .lp-footer a {
  color: rgba(26, 20, 40, 0.7);
}

html[data-theme="light"] body.lp .lp-footer a:hover,
body.lp.theme-light .lp-footer a:hover {
  color: #6b2bff;
}

html[data-theme="light"] body.lp .lp-copy,
body.lp.theme-light .lp-copy {
  border-top-color: rgba(42, 17, 72, 0.1);
  color: rgba(26, 20, 40, 0.55);
}

html[data-theme="light"] body.lp .lp-footer-tag,
body.lp.theme-light .lp-footer-tag {
  color: rgba(26, 20, 40, 0.55);
}

html[data-theme="light"] body.lp .lp-footer .lp-brand,
body.lp.theme-light .lp-footer .lp-brand {
  color: #1a0a32;
}

html[data-theme="light"] body.lp .lp-networks strong,
body.lp.theme-light .lp-networks strong {
  color: #1a0a32;
}

html[data-theme="light"] body.lp .lp-net,
body.lp.theme-light .lp-net {
  background: #f5f2fb;
  border-color: rgba(42, 17, 72, 0.08);
}

/* Auth pages */
html[data-theme="light"] body.auth-dark,
body.auth-dark.theme-light {
  color: #1a1428;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(138, 43, 226, 0.1), transparent 55%),
    linear-gradient(180deg, #f5f2fb 0%, #efeaf8 50%, #f8f6fc 100%);
}

html[data-theme="light"] body.auth-dark .ad-nav,
body.auth-dark.theme-light .ad-nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(42, 17, 72, 0.08);
}

html[data-theme="light"] body.auth-dark .ad-brand,
html[data-theme="light"] body.auth-dark .ad-links a,
body.auth-dark.theme-light .ad-brand,
body.auth-dark.theme-light .ad-links a {
  color: #2a1148;
}

html[data-theme="light"] body.auth-dark .ad-card,
body.auth-dark.theme-light .ad-card {
  background: #fff;
  border-color: rgba(42, 17, 72, 0.1);
  color: #1a1428;
}

html[data-theme="light"] body.auth-dark .ad-card h1,
body.auth-dark.theme-light .ad-card h1 {
  color: #1a0a32;
}

html[data-theme="light"] body.auth-dark .ad-hint,
html[data-theme="light"] body.auth-dark .ad-footer,
body.auth-dark.theme-light .ad-hint,
body.auth-dark.theme-light .ad-footer {
  color: rgba(26, 20, 40, 0.55);
}

html[data-theme="light"] body.auth-dark .ad-card label,
body.auth-dark.theme-light .ad-card label {
  color: #2a1148;
}

html[data-theme="light"] body.auth-dark .ad-card .input,
html[data-theme="light"] body.auth-dark .ad-card .input-wrap,
body.auth-dark.theme-light .ad-card .input,
body.auth-dark.theme-light .ad-card .input-wrap {
  background: #f5f2fb;
  border-color: rgba(42, 17, 72, 0.12);
  color: #1a1428;
}

html[data-theme="light"] body.auth-dark .ad-submit.ghost,
body.auth-dark.theme-light .ad-submit.ghost {
  color: #2a1148;
  border-color: rgba(42, 17, 72, 0.25);
}

html[data-theme="light"] body.auth-dark .ad-profile,
body.auth-dark.theme-light .ad-profile {
  color: #2a1148;
  border-color: rgba(42, 17, 72, 0.25);
}

/* General body (styles.css pages) */
html[data-theme="light"] body:not(.lp):not(.auth-dark):not(.app-body) {
  color: #1a1428;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(196, 168, 130, 0.12), transparent 55%),
    linear-gradient(180deg, #f5f2fb 0%, #f8f6fc 100%);
}

html[data-theme="light"] body:not(.lp):not(.auth-dark):not(.app-body) .site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(42, 17, 72, 0.08);
}

html[data-theme="light"] body:not(.lp):not(.auth-dark):not(.app-body) .brand-name,
html[data-theme="light"] body:not(.lp):not(.auth-dark):not(.app-body) .auth-card h1 {
  color: #1a0a32;
}

html[data-theme="light"] body:not(.lp):not(.auth-dark):not(.app-body) .auth-card,
html[data-theme="light"] body:not(.lp):not(.auth-dark):not(.app-body) .panel {
  background: #fff;
  border-color: rgba(42, 17, 72, 0.1);
  color: #1a1428;
}

html[data-theme="light"] body:not(.lp):not(.auth-dark):not(.app-body) .input,
html[data-theme="light"] body:not(.lp):not(.auth-dark):not(.app-body) .input-wrap {
  background: #f5f2fb;
  border-color: rgba(42, 17, 72, 0.12);
  color: #1a1428;
}

/* Theme toggle button (shared) */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fdd100;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

html[data-theme="light"] .theme-toggle {
  border-color: rgba(42, 17, 72, 0.18);
  background: #fff;
  color: #6b2bff;
  box-shadow: 0 4px 12px rgba(42, 17, 72, 0.08);
}

.theme-toggle:hover { filter: brightness(1.08); }

/* Home page cards follow app theme vars */
body.app-body .hm-wallet,
body.app-body .hm-stat,
body.app-body .hm-q,
body.app-body .hm-help,
body.app-body .hm-tx {
  background: var(--dash-surface-solid);
  border: 1px solid var(--dash-border);
  color: var(--dash-text);
  box-shadow: var(--dash-shadow);
}

body.app-body .hm-wallet .label,
body.app-body .hm-stat .t,
body.app-body .hm-q small,
body.app-body .hm-help p {
  color: var(--dash-muted);
}

body.app-body .hm-wallet .bal,
body.app-body .hm-stat .v,
body.app-body .hm-quick h3,
body.app-body .hm-q strong,
body.app-body .hm-help h3,
body.app-body .hm-tx h3 {
  color: var(--dash-title);
}

body.app-body .hm-wallet .add,
body.app-body .hm-help a {
  border-color: rgba(196, 181, 253, 0.55);
  color: #c4b5fd;
}

body.app-body.theme-light .hm-wallet .add,
body.app-body.theme-light .hm-help a {
  border-color: #c4b5fd;
  color: #6b2bff;
}

body.app-body .tf-feat,
body.app-body .tf-wallet,
body.app-body .tf-track,
body.app-body .tf-recent,
body.app-body .tf-svc {
  background: var(--dash-surface-solid);
  border-color: var(--dash-border);
  color: var(--dash-text);
  box-shadow: var(--dash-shadow);
}

body.app-body .tf-feat,
body.app-body .tf-section-title {
  color: var(--dash-title);
}

body.app-body .tf-svc strong { color: var(--dash-title); }
body.app-body .tf-svc small,
body.app-body .tf-wallet .label,
body.app-body .tf-recv-hint { color: var(--dash-muted); }

body.app-body .tf-s {
  background: var(--dash-input);
  color: var(--dash-muted);
}

body.app-body .tf-recv-box {
  background: var(--dash-recv-bg);
  border-color: var(--dash-recv-border);
}

body.app-body .tf-recv-num {
  background: var(--dash-input);
  border-color: var(--dash-border);
}

body.app-body .tf-recv-num strong { color: var(--dash-title); }

body.app-body .tf-note {
  background: var(--dash-accent-soft);
  border-color: var(--dash-border);
  color: #e9d5ff;
}

body.app-body.theme-light .tf-note {
  color: #5b21b6;
  background: #faf5ff;
  border-color: #e9d5ff;
}

/* قوائم الاختيار (محافظ وغيرها) — وضوح في الدارك/اللايت */
html[data-theme="dark"] body.app-body select,
body.app-body.theme-dark select,
body.app-body:not(.theme-light) select {
  color-scheme: dark;
  background-color: #1c0e3a !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] body.app-body select option,
html[data-theme="dark"] body.app-body select optgroup,
body.app-body.theme-dark select option,
body.app-body.theme-dark select optgroup,
body.app-body:not(.theme-light) select option,
body.app-body:not(.theme-light) select optgroup {
  background-color: #1c0e3a !important;
  color: #f8fafc !important;
}

html[data-theme="light"] body.app-body select,
body.app-body.theme-light select {
  color-scheme: light;
  background-color: #ffffff !important;
  color: #1a1428 !important;
}

html[data-theme="light"] body.app-body select option,
html[data-theme="light"] body.app-body select optgroup,
body.app-body.theme-light select option,
body.app-body.theme-light select optgroup {
  background-color: #ffffff !important;
  color: #1a1428 !important;
}

/* حقول عامة + autofill — ما يختفيش النص في الدارك */
body.app-body input,
body.app-body textarea,
body.app-body select {
  color: var(--dash-text);
}

body.app-body input::placeholder,
body.app-body textarea::placeholder {
  color: var(--dash-muted);
  opacity: 0.9;
}

html[data-theme="dark"] body.app-body input:-webkit-autofill,
html[data-theme="dark"] body.app-body textarea:-webkit-autofill,
body.app-body:not(.theme-light) input:-webkit-autofill,
body.app-body:not(.theme-light) textarea:-webkit-autofill {
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc;
  box-shadow: 0 0 0 1000px #1c0e3a inset !important;
  transition: background-color 99999s ease-out;
}

html[data-theme="light"] body.app-body input:-webkit-autofill,
html[data-theme="light"] body.app-body textarea:-webkit-autofill,
body.app-body.theme-light input:-webkit-autofill,
body.app-body.theme-light textarea:-webkit-autofill {
  -webkit-text-fill-color: #1a1428 !important;
  caret-color: #1a1428;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  transition: background-color 99999s ease-out;
}

/* روابط وجداول — وضوح بدون ما تحتاج hover */
body.app-body a:not(.btn):not(.sh-cta):not(.sh-btn):not(.db-cta):not(.tf-submit):not(.tf-fab):not(.sh-again):not(.admin-pill) {
  color: #c4b5fd;
}
body.app-body.theme-light a:not(.btn):not(.sh-cta):not(.sh-btn):not(.db-cta):not(.tf-submit):not(.tf-fab):not(.sh-again),
html[data-theme="light"] body.app-body a:not(.btn):not(.sh-cta):not(.sh-btn):not(.db-cta):not(.tf-submit):not(.tf-fab):not(.sh-again) {
  color: #6b2bff;
}

body.app-body .table th {
  color: var(--dash-muted);
  font-weight: 700;
}
body.app-body .table td {
  color: var(--dash-text);
  border-bottom-color: var(--dash-border);
  font-weight: 600;
}

body.app-body .bottom-nav {
  background: var(--dash-surface-solid);
  border-top-color: var(--dash-border);
}

body.app-body .bottom-nav a { color: var(--dash-muted); }
body.app-body .bottom-nav a.is-active { color: #fdd100; }
body.app-body.theme-light .bottom-nav a.is-active { color: #6b2bff; }

body.app-body .table th { color: var(--dash-muted); font-weight: 700; }
body.app-body .table td { color: var(--dash-text); border-bottom-color: var(--dash-border); font-weight: 600; }
body.app-body .empty { color: var(--dash-muted); font-weight: 600; }

body.app-body .panel,
body.app-body .stat-card,
body.app-body .order-card {
  color: var(--dash-text);
}

body.app-body .panel-title h2,
body.app-body .app-top h1,
body.app-body [data-page-title] {
  color: var(--dash-title) !important;
  font-weight: 800;
}

body.app-body .chip {
  background: var(--dash-input);
  border-color: var(--dash-border);
  color: var(--dash-muted);
}

body.app-body a { color: #e9d5ff; }
body.app-body a:hover { color: #fdd100; }
body.app-body.theme-light a { color: #6b2bff; }
body.app-body.theme-light a:hover { color: #4c1d95; }

body.app-body .tx-amount {
  font-weight: 800;
  color: #fdd100;
}

body.app-body.theme-light .tx-amount {
  color: #6b2bff;
}

/* Support page readability */
html[data-theme="light"] body.auth-dark .sup-hero h1,
body.auth-dark.theme-light .sup-hero h1 { color: #1a0a32; }
html[data-theme="light"] body.auth-dark .sup-hero p,
body.auth-dark.theme-light .sup-hero p { color: rgba(26,20,40,.65); }
html[data-theme="light"] body.auth-dark .sup-card,
body.auth-dark.theme-light .sup-card {
  background: #fff;
  border-color: rgba(42,17,72,.1);
  color: #1a1428;
}
html[data-theme="light"] body.auth-dark .sup-card p,
body.auth-dark.theme-light .sup-card p { color: rgba(26,20,40,.6); }
html[data-theme="light"] body.auth-dark .sup-back,
body.auth-dark.theme-light .sup-back {
  color: #2a1148;
  border-color: rgba(42,17,72,.15);
  background: #fff;
}
html[data-theme="light"] body.auth-dark .sup-label,
body.auth-dark.theme-light .sup-label { color: rgba(26,20,40,.55); }

body.auth-dark .sup-hero p,
body.auth-dark .sup-card p {
  color: rgba(248, 250, 252, 0.75);
  font-weight: 600;
}
body.auth-dark .sup-hero h1,
body.auth-dark .sup-card h2 {
  color: #fff;
  font-weight: 800;
}
