/* Homepage-only presentation. Shared dashboard styles are intentionally separate. */
:root { --home-panel: #121321; --home-ink: #f4f2ff; --home-muted: #aaa6bf; --home-border: rgba(184,166,231,.18); }
html[data-theme="light"] { --home-panel: #faf8ff; --home-ink: #30283f; --home-muted: #70647e; --home-border: #d8cee6; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip !important; overflow-y: visible; width: auto !important; position: static !important; }
.ambient-one { right: 0; animation: none; max-width: 100%; }
.ambient-two { left: 0; animation: none; max-width: 100%; }
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid #bba1ff; outline-offset: 5px; }
section[id], footer[id] { scroll-margin-top: 110px; }
.skip-link { position: fixed; top: -80px; right: 24px; z-index: 500; padding: 14px 20px; border-radius: 12px; background: #fff; color: #392256; }
.skip-link:focus { top: 12px; }
.topbar, .topbar.is-scrolled { position: sticky; top: 12px; z-index: 40; height: 76px; margin-top: 16px; padding: 0 22px; border: 1px solid var(--home-border); border-radius: 20px; background: rgba(14,15,27,.88); backdrop-filter: blur(22px); animation: none; }
.topbar nav { margin: 0; gap: 8px; }
.topbar nav a { border-radius: 10px; padding: 11px 15px; color: var(--home-muted); font-weight: 700; transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease; }
.topbar nav a:hover { color: var(--home-ink); background: rgba(154,121,227,.09); }
.topbar nav a.nav-active, .topbar nav a.active { color: #c8b7ff !important; background: rgba(154, 121, 227, 0.18) !important; box-shadow: inset 0 0 0 1px rgba(184, 150, 255, 0.24); }
html[data-theme="light"] .topbar nav a.nav-active, html[data-theme="light"] .topbar nav a.active { color: #633ec4 !important; background: rgba(120, 80, 220, 0.12) !important; box-shadow: inset 0 0 0 1px rgba(120, 80, 220, 0.18); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.topbar .theme-toggle { position: static; box-shadow: none; min-height: 42px; padding: 9px 12px; font-size: 12px; }
.topbar .account-area { margin: 0 !important; }
.login-button { min-height: 42px; font-size: 13px; background: rgba(153,119,234,.06); }
.nav-toggle { display: none; }
.account-menu { top: calc(100% + 20px); padding: 10px; background: var(--home-panel); border: 1px solid var(--home-border); border-radius: 18px; color: var(--home-ink); }
.account-summary { padding: 8px; }
.account-tag { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.account-menu [role="menuitem"] { justify-content: flex-start; gap: 12px; min-height: 46px; font-size: 14px; }
.account-menu .dashboard-menu-button { color: var(--home-ink); }
.hero { padding-top: 50px; min-height: 590px; }
.hero-description { max-width: 450px; }
.hero-visual { isolation: isolate; }
.hero-visual::before { width: 330px; height: 330px; background: radial-gradient(circle,rgba(146,110,237,.2),transparent 70%); animation: none; }
.hero-visual .orbit { animation: none; transform: rotateX(65deg) rotateZ(-18deg); bottom: 25px; border-color: rgba(174,144,255,.13); }
.hero-visual .orbit-b { width: 430px; height: 430px; border-style: dashed; opacity: .6; }
.bot-scale { width: 230px; height: 252px; position: relative; transform: scale(0.85); z-index: 2; }
/* ─── Official Brand Logo Mascot with Winking Eye ─── */
.smsar-logo-mascot {
  position: relative; width: 230px; height: 252px; margin: 0 auto;
  animation: mascot-float 5s ease-in-out infinite;
  filter: drop-shadow(0 20px 38px rgba(120, 60, 240, 0.38));
  transform: translateZ(0);
  will-change: transform;
}
.mascot-ambient-glow {
  position: absolute; inset: 5%; border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 115, 255, 0.42), rgba(110, 50, 230, 0.18) 45%, transparent 70%);
  filter: blur(30px); pointer-events: none;
  animation: mascot-pulse 3.5s ease-in-out infinite alternate;
}
.mascot-symbol {
  display: block; width: 100%; height: 100%; object-fit: contain;
  position: relative; z-index: 1; pointer-events: none; user-select: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.mascot-eye {
  position: absolute; z-index: 2; width: 12.2%; height: 11.2%; border-radius: 50%;
  background: linear-gradient(175deg, #b065ff 0%, #a453ff 50%, #9340f6 100%);
  box-shadow: 0 2px 5px rgba(110, 40, 210, 0.25);
  transform: translate(-50%, -50%); pointer-events: none;
  top: 54.92%;
}
.mascot-eye-left {
  left: 40.63%;
}
.mascot-eye-right {
  left: 64.18%; transform-origin: center center;
}
.mascot-eye-wink {
  animation: mascot-wink 5.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ─── Orbit rings with floating dots ─── */
.hero-visual .orbit { position: absolute; z-index: 1; pointer-events: none; }
.orbit-dot {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
}
.orbit-a .orbit-dot:nth-child(1) { top: 0; left: 50%; }
.orbit-a .orbit-dot:nth-child(2) { bottom: 25%; right: 0; }
.orbit-a .orbit-dot:nth-child(3) { top: 40%; left: 0; }
.orbit-b .orbit-dot:nth-child(1) { top: 15%; right: 5%; }
.orbit-b .orbit-dot:nth-child(2) { bottom: 10%; left: 10%; }

/* ─── Enhanced status cards ─── */
.hero-visual .status-card {
  position: absolute; z-index: 4;
  width: auto; min-width: 148px;
  border: 1px solid rgba(163,126,243,.2);
  padding: 14px 16px; border-radius: 16px;
  background: rgba(18,16,36,.85);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.06);
  animation: none;
  transition: background .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.hero-visual .mini-icon { flex: none; transition: background .35s ease, border-color .35s ease; }
.hero-visual .mini-icon img { width: 23px; height: 23px; object-fit: contain; }
.hero-visual .status-card [data-stat] { margin-top: 3px; font-size: 18px; font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }
.hero-visual .card-left { top: 112px; right: 2px; transform: rotate(5deg); }
.hero-visual .card-right { bottom: 125px; left: 2px; transform: rotate(-5deg); }
.hero-visual .online-pill {
  bottom: 27px; animation: none; font-size: 12px;
  border: 1px solid rgba(163,126,243,.2);
  background: rgba(14,12,28,.9);
  backdrop-filter: blur(12px);
  transition: background .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.features { padding-top: 110px; padding-bottom: 88px; }
.section-heading { max-width: 760px; }
.section-heading h2 { font-size: clamp(27px,3.1vw,39px); line-height: 1.45; }
.section-heading>p:last-child { margin-bottom: 18px; }
.folder-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px; }
.system-folder { min-width: 0; position: relative; padding: 0 4px; }
.system-folder.is-open { z-index: 3; }
.folder-scene { position: relative; height: 282px; margin-top: 22px; direction: ltr; }
.folder-scene .gf-root { position: absolute; left: 0; top: 0; display: block; font-family: Tajawal,Arial,sans-serif; --gf-spread: 0px; }
.folder-scene .gf-stage { top: 90px; }
.folder-scene .gf-back { background: linear-gradient(145deg,var(--folder-accent),#211931); transition: background .4s ease; }
.folder-scene .gf-art {
  width: 364px;
  height: 296px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0,0,0,0.3) 78%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0,0,0,0.3) 78%, transparent 94%);
}
.folder-scene .gf-back-rim { width: 340px; height: 272px; }
.folder-scene .gf-back-rim path { stroke: rgba(238,227,255,.45); stroke-width: 1.6; fill: none; }
.folder-scene .gf-front { top: 73px; height: 200px; backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.folder-scene .gf-front-rim { width: 340px; height: 200px; }
.folder-scene .gf-front-rim path { stroke: rgba(235,225,255,.7); stroke-width: 1.6; fill: none; }
.folder-scene .gf-tint { transition: background .4s ease; }
.folder-scene .gf-root[data-tone="dark"] .gf-tint { background: linear-gradient(180deg,rgba(49,42,66,.12),rgba(27,24,39,.68) 42%,rgba(22,19,31,.97)); }
.folder-scene .gf-root[data-place="bottom-left"] .gf-label { left: auto; right: 25px; bottom: 29px; max-width: 275px; align-items: flex-start; direction: rtl; }
.folder-scene .gf-label img { width: 39px; height: 39px; object-fit: contain; margin-bottom: 6px; filter: drop-shadow(0 2px 5px #0003); }
.folder-scene .gf-icon-wrapper { display: inline-flex; align-items: center; justify-content: flex-start; width: 38px; height: 38px; margin-bottom: 6px; color: var(--folder-accent, #c084fc); filter: drop-shadow(0 2px 8px rgba(168, 85, 247, 0.45)); }
.folder-scene .gf-icon-wrapper .gf-icon-svg { width: 32px; height: 32px; }
.folder-scene .gf-title { font: 800 24px/1.4 Tajawal,Arial,sans-serif; margin: 0; transition: color .35s ease; }
.folder-scene .gf-meta { font: 500 13px/1.6 Tajawal,Arial,sans-serif; letter-spacing: 0; color: #c0b6d2; transition: color .35s ease; }
.folder-open-icon {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  bottom: 38px;
  left: 22px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(30, 24, 46, 0.82);
  color: #ded3ee;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform .3s ease, rotate .3s ease, background .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.folder-open-icon:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 3px;
}
.gf-root[data-open] .folder-open-icon {
  rotate: 90deg;
}
.folder-scene:hover .folder-open-icon,
.folder-scene .gf-root:hover .folder-open-icon,
.folder-open-icon:hover {
  background: linear-gradient(135deg, var(--folder-accent, #8b5cf6), #7c3aed);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}
.folder-scene .gf-root[data-open] .folder-open-icon,
.folder-scene .gf-root[data-tone="dark"][data-open] .folder-open-icon {
  background: var(--folder-accent, #7853dd);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(120, 83, 221, 0.42);
  transform: scale(1);
}
.folder-scene .gf-sheet { width: 284px; left: 28px; }
.folder-scene .gf-sheet-head { direction: rtl; text-align: right; padding: 4px; display: flex; flex-direction: column; align-items: stretch; gap: 1px; }
.folder-scene .gf-sheet-name { font-family: inherit; font-size: 18px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.folder-scene .gf-sheet-meta { font-family: inherit; font-size: 12px; margin-top: 3px; }
.folder-scene .gf-lines { top: 85px; opacity: .45; }
.folder-scene .gf-lines i { width: 80%; }
.folder-scene .gf-lines i:last-child { width: 50%; }
.folder-scene .gf-root[data-tone="dark"] .gf-sheet { background: linear-gradient(130deg,#444052,#252130); }
.folder-scene .gf-root[data-open] { --gf-hinge: -28deg; --gf-lift: -105px; --gf-stack: 58px; --gf-spread: 5px; --gf-fan: 3deg; }
.getting-started { padding: 35px 0 90px; }
.setup-steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 40px; }
.setup-steps li { position: relative; padding: 24px 24px 12px; border-top: 1px solid var(--home-border); }
.step-number { color: #b99ae9; font: 14px ui-monospace,monospace; }
.setup-steps h3 { font-size: 20px; margin: 18px 0 10px; }
.setup-steps p { color: var(--home-muted); font-size: 14px; line-height: 1.9; margin: 0; }
.end-cta { border-radius: 24px; margin-bottom: 65px; }
.system-dialog { width: min(620px,calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 26px; border-radius: 24px; background: var(--home-panel); color: var(--home-ink); text-align: right; border: 1px solid var(--home-border); box-shadow: 0 32px 100px #0006; }
.system-dialog::backdrop { background: #070810aa; backdrop-filter: blur(12px); }
.system-dialog-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; }
.system-dialog-label { color: var(--home-muted); font-size: 12px; }
.system-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--home-border); background: transparent; color: var(--home-ink); font: 25px/1 Arial,sans-serif; cursor: pointer; }
.system-close:hover { background: #9576cd22; }
.system-intro { display: flex; align-items: center; gap: 17px; margin-bottom: 25px; }
.system-icon { width: 66px; height: 66px; padding: 12px; border-radius: 19px; background: #9876d51a; border: 1px solid var(--home-border); }
.system-intro p { margin: 0 0 5px; font-size: 12px; color: var(--home-muted); }
.system-intro h2 { font-size: 28px; margin: 0; }
.system-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; border: 1px solid var(--home-border); border-radius: 14px; background: #8070960b; }
.system-tabs button { padding: 12px 8px; border: 0; border-radius: 9px; color: var(--home-muted); background: transparent; font: 700 14px Tajawal,Arial,sans-serif; cursor: pointer; }
.system-tabs button[aria-selected="true"] { color: #eee5ff; background: #78619b40; box-shadow: inset 0 0 0 1px #b390ed2b; }
.system-panel { padding: 6px 0 16px; min-height: 275px; }
.system-panel .system-description { margin: 20px 0 18px; color: var(--home-muted); }
.system-detail-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.system-detail-list li { display: flex; align-items: flex-start; gap: 13px; padding: 14px; border: 1px solid var(--home-border); border-radius: 13px; font-size: 14px; line-height: 1.85; }
.system-detail-marker { flex: 0 0 28px; display: grid; place-items: center; height: 28px; border-radius: 8px; background: #a282d71a; color: #c5a4f4; font-size: 12px; font-weight: 700; }
.system-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 20px; border-top: 1px solid var(--home-border); }
.system-dialog-footer>span { color: var(--home-muted); font-size: 12px; }
.system-dialog-footer .primary-button { font-size: 13px; padding: 13px 17px; box-shadow: none; }
.toast { z-index: 100; }
body.fork-open { overflow: hidden !important; }
html[data-theme="light"] body .topbar { background: rgba(250,248,255,.92) !important; }
/* ─── Light Mode Folders ("الملفات") ─── */
html[data-theme="light"] .folder-scene .gf-root,
.folder-scene .gf-root[data-tone="light"] {
  --gf-ink: #1f1636 !important;
  --gf-ink-soft: #63567d !important;
}
html[data-theme="light"] .folder-scene .gf-tint,
.folder-scene .gf-root[data-tone="light"] .gf-tint {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(252, 249, 255, 0.86) 38%,
    rgba(244, 238, 255, 0.96) 100%
  ) !important;
}
html[data-theme="light"] .folder-scene .gf-spec,
.folder-scene .gf-root[data-tone="light"] .gf-spec {
  background: radial-gradient(280px 200px at calc(50% + var(--gf-px) * 40%) 25%, rgba(255, 255, 255, 0.95) 0%, rgba(225, 208, 255, 0.35) 50%, transparent 75%) !important;
  mix-blend-mode: normal !important;
  opacity: 0.9 !important;
}
html[data-theme="light"] .folder-scene .gf-front-rim path,
.folder-scene .gf-root[data-tone="light"] .gf-front-rim path {
  stroke: rgba(142, 92, 232, 0.35) !important;
  stroke-width: 1.6 !important;
  filter: drop-shadow(0 2px 5px rgba(95, 45, 175, 0.12)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.95)) !important;
}
html[data-theme="light"] .folder-scene .gf-title,
.folder-scene .gf-root[data-tone="light"] .gf-title {
  color: #1f1636 !important;
  font-weight: 800 !important;
}
html[data-theme="light"] .folder-scene .gf-meta,
.folder-scene .gf-root[data-tone="light"] .gf-meta {
  color: #63567d !important;
  font-weight: 600 !important;
}
html[data-theme="light"] .folder-scene .gf-label img,
.folder-scene .gf-root[data-tone="light"] .gf-label img {
  filter: drop-shadow(0 4px 10px rgba(90, 45, 160, 0.2)) !important;
}
html[data-theme="light"] .folder-open-icon,
.folder-scene .gf-root[data-tone="light"] .folder-open-icon {
  border: 1px solid rgba(135, 105, 225, 0.28) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #613cb5 !important;
  box-shadow: 0 4px 12px rgba(85, 45, 155, 0.1), inset 0 1px 0 #ffffff !important;
  backdrop-filter: blur(8px) !important;
}
html[data-theme="light"] .folder-scene:hover .folder-open-icon,
html[data-theme="light"] .folder-scene .gf-root:hover .folder-open-icon,
html[data-theme="light"] .folder-open-icon:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.38) !important;
  transform: scale(1.08);
}
html[data-theme="light"] .folder-scene .gf-root[data-open] .folder-open-icon,
.folder-scene .gf-root[data-tone="light"][data-open] .folder-open-icon {
  background: #7853dd !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(120, 83, 221, 0.35) !important;
  transform: scale(1);
}
/* ─── Dark Mode Specific Overrides for Folder Circles ─── */
html[data-theme="dark"] .folder-open-icon,
.folder-scene .gf-root[data-tone="dark"] .folder-open-icon {
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: rgba(30, 24, 46, 0.82) !important;
  color: #ded3ee !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}
html[data-theme="dark"] .folder-scene:hover .folder-open-icon,
html[data-theme="dark"] .folder-scene .gf-root:hover .folder-open-icon,
html[data-theme="dark"] .folder-open-icon:hover,
.folder-scene .gf-root[data-tone="dark"]:hover .folder-open-icon,
.folder-scene .gf-root[data-tone="dark"] .folder-open-icon:hover {
  background: linear-gradient(135deg, var(--folder-accent, #8b5cf6), #7c3aed) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: scale(1.08);
}
html[data-theme="dark"] .folder-scene .gf-root[data-open] .folder-open-icon,
.folder-scene .gf-root[data-tone="dark"][data-open] .folder-open-icon {
  background: var(--folder-accent, #7853dd) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 14px rgba(120, 83, 221, 0.42) !important;
  transform: scale(1);
}
html[data-theme="light"] .folder-scene .gf-sheet,
.folder-scene .gf-root[data-tone="light"] .gf-sheet {
  background: linear-gradient(145deg, #ffffff 0%, #f9f7fd 100%) !important;
  border: 1px solid rgba(140, 105, 225, 0.22) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 4px 14px rgba(70, 35, 130, 0.08),
    0 18px 36px -6px rgba(55, 25, 110, 0.16) !important;
}
html[data-theme="light"] .folder-scene .gf-sheet-name,
.folder-scene .gf-root[data-tone="light"] .gf-sheet-name {
  color: #1e1533 !important;
  font-weight: 700 !important;
}
html[data-theme="light"] .folder-scene .gf-sheet-name span[aria-hidden] {
  color: #7c3aed !important;
}
html[data-theme="light"] .folder-scene .gf-sheet-meta,
.folder-scene .gf-root[data-tone="light"] .gf-sheet-meta {
  color: #6e6189 !important;
}
html[data-theme="light"] .folder-scene .gf-lines i,
.folder-scene .gf-root[data-tone="light"] .gf-lines i {
  background: rgba(140, 105, 225, 0.14) !important;
}
html[data-theme="light"] .folder-scene .gf-lines i:first-child,
.folder-scene .gf-root[data-tone="light"] .gf-lines i:first-child {
  background: rgba(140, 105, 225, 0.24) !important;
}
html[data-theme="light"] .folder-scene .gf-back,
.folder-scene .gf-root[data-tone="light"] .gf-back {
  background: linear-gradient(150deg, var(--folder-accent) 0%, #301456 100%) !important;
}
html[data-theme="light"] .folder-scene .gf-back-rim path,
.folder-scene .gf-root[data-tone="light"] .gf-back-rim path {
  stroke: rgba(255, 255, 255, 0.8) !important;
  stroke-width: 1.5 !important;
  filter: drop-shadow(0 1px 2px rgba(45, 15, 80, 0.35)) !important;
}
html[data-theme="light"] .folder-scene .gf-shadow,
.folder-scene .gf-root[data-tone="light"] .gf-shadow {
  background: radial-gradient(ellipse at 50% 50%, rgba(120, 70, 215, 0.24) 0%, rgba(85, 40, 160, 0.1) 45%, transparent 75%) !important;
  filter: blur(18px) !important;
  height: 55px !important;
  bottom: -8px !important;
}

/* ─── Light Mode System Dialogs ─── */
html[data-theme="light"] .system-dialog {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(140, 105, 225, 0.24) !important;
  box-shadow: 0 32px 80px rgba(50, 20, 100, 0.16) !important;
}
html[data-theme="light"] .system-dialog::backdrop {
  background: rgba(230, 225, 245, 0.6) !important;
  backdrop-filter: blur(14px) !important;
}
html[data-theme="light"] .system-tabs {
  background: rgba(140, 105, 225, 0.08) !important;
  border-color: rgba(140, 105, 225, 0.18) !important;
}
html[data-theme="light"] .system-tabs button {
  color: #63567d !important;
}
html[data-theme="light"] .system-tabs button[aria-selected="true"] {
  background: #ffffff !important;
  color: #6236bb !important;
  box-shadow: 0 2px 8px rgba(70, 30, 140, 0.1), inset 0 0 0 1px rgba(140, 105, 225, 0.2) !important;
}
html[data-theme="light"] .system-detail-list li {
  border-color: rgba(140, 105, 225, 0.15) !important;
  background: rgba(255, 255, 255, 0.65) !important;
  color: #2a203f !important;
}
html[data-theme="light"] .system-detail-marker {
  background: #ede6fd !important;
  color: #7244ca !important;
}
html[data-theme="light"] .system-close {
  background: rgba(140, 105, 225, 0.08) !important;
  border-color: rgba(140, 105, 225, 0.18) !important;
  color: #30283f !important;
}
html[data-theme="light"] .system-close:hover {
  background: rgba(140, 105, 225, 0.18) !important;
}

/* ─── Light Mode Hero Cards & Badges ("القوالب السوداء") ─── */
html[data-theme="light"] .hero-visual .status-card {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(135, 105, 225, 0.22) !important;
  color: #231b34 !important;
  box-shadow: 0 10px 30px rgba(70, 45, 120, 0.08), 0 2px 8px rgba(70, 45, 120, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(16px) saturate(1.2) !important;
}
html[data-theme="light"] .hero-visual .status-card small {
  color: #6e6484 !important;
}
html[data-theme="light"] .hero-visual .status-card b,
html[data-theme="light"] .hero-visual .status-card [data-stat] {
  color: #231b34 !important;
}
html[data-theme="light"] .hero-visual .mini-icon {
  background: #ede6fd !important;
  border: 1px solid rgba(135, 105, 225, 0.18) !important;
}
html[data-theme="light"] .online-pill {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(135, 105, 225, 0.22) !important;
  color: #231b34 !important;
  box-shadow: 0 4px 18px rgba(70, 45, 120, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px) !important;
}
html[data-theme="light"] .online-pill .online-dot,
html[data-theme="light"] .online-pill i {
  background: #10b981 !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.45) !important;
}
html[data-theme="light"] .notification {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(135, 105, 225, 0.22) !important;
  color: #231b34 !important;
  box-shadow: 0 8px 24px rgba(70, 45, 120, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
html[data-theme="light"] .hero-visual .orbit {
  border-color: rgba(120, 80, 220, 0.12) !important;
}
html[data-theme="light"] .orbit-dot {
  display: none !important;
}
html[data-theme="light"] .hero-visual .bot-shadow {
  opacity: 0.35 !important;
  background: radial-gradient(ellipse, rgba(130, 70, 240, 0.4), transparent 70%) !important;
}
html[data-theme="light"] .system-tabs button[aria-selected="true"] { color: #523276 !important; background: #ede4f7 !important; }
html[data-theme="light"] .system-detail-marker { color: #704799 !important; }
html[data-theme="light"] .setup-steps .step-number { color: #8057a6 !important; }
html[data-theme="light"] .hero-description, html[data-theme="light"] .section-heading>p:last-child { color: var(--home-muted); }
html[data-theme="light"] .hero .eyebrow, html[data-theme="light"] .section-heading .eyebrow { color: #7958a4; }
html[data-theme="light"] .hero h1 strong, html[data-theme="light"] .section-heading strong { background-image: linear-gradient(90deg,#9162c9,#6244b3); }
html[data-theme="light"] .smsar-logo-mascot { filter: drop-shadow(0 16px 32px rgba(130, 80, 240, 0.28)); }
html[data-theme="light"] .system-dialog {
  background: #ffffff !important;
  color: #231b34 !important;
  border-color: rgba(135, 105, 225, 0.2) !important;
  box-shadow: 0 32px 80px rgba(60, 40, 110, 0.15) !important;
}
html[data-theme="light"] .system-dialog::backdrop {
  background: rgba(30, 20, 50, 0.35) !important;
  backdrop-filter: blur(8px) !important;
}
html[data-theme="light"] .system-tabs {
  background: rgba(135, 105, 225, 0.06) !important;
  border-color: rgba(135, 105, 225, 0.16) !important;
}
html[data-theme="light"] .system-tabs button {
  color: #6e6484 !important;
}
html[data-theme="light"] .system-tabs button[aria-selected="true"] {
  color: #523276 !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(70, 45, 120, 0.08), inset 0 0 0 1px rgba(135, 105, 225, 0.2) !important;
}
html[data-theme="light"] .system-detail-list li {
  background: #faf8fd !important;
  border-color: rgba(135, 105, 225, 0.14) !important;
  color: #231b34 !important;
}
html[data-theme="light"] .system-detail-marker {
  background: rgba(135, 105, 225, 0.12) !important;
  color: #704799 !important;
}
html[data-theme="light"] .system-close {
  color: #6e6484 !important;
  border-color: rgba(135, 105, 225, 0.18) !important;
}
html[data-theme="light"] .system-close:hover {
  background: rgba(135, 105, 225, 0.1) !important;
  color: #231b34 !important;
}
html[data-theme="light"] .system-icon {
  background: rgba(135, 105, 225, 0.08) !important;
  border-color: rgba(135, 105, 225, 0.16) !important;
}
html[data-theme="light"] #login-dialog {
  background: #ffffff !important;
  color: #231b34 !important;
  border-color: rgba(135, 105, 225, 0.2) !important;
  box-shadow: 0 25px 80px rgba(60, 40, 110, 0.16) !important;
}
html[data-theme="light"] #login-dialog::backdrop {
  background: rgba(30, 20, 50, 0.35) !important;
  backdrop-filter: blur(8px) !important;
}
html[data-theme="light"] #login-dialog h2 {
  color: #231b34 !important;
}
html[data-theme="light"] #login-dialog p {
  color: #6e6484 !important;
}
html[data-theme="light"] .close-dialog {
  color: #6e6484 !important;
}
html[data-theme="light"] .close-dialog:hover {
  color: #231b34 !important;
}
html[data-theme="light"] .toast {
  background: #ffffff !important;
  color: #231b34 !important;
  border: 1px solid rgba(135, 105, 225, 0.22) !important;
  box-shadow: 0 12px 36px rgba(60, 40, 110, 0.14) !important;
}
@keyframes mascot-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-11px) rotate(-1deg); } }
@keyframes mascot-wink {
  0%, 40%, 48%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 2px 5px rgba(110, 40, 210, 0.25);
  }
  43%, 45% {
    transform: translate(-50%, -50%) scaleX(1.12) scaleY(0.06);
    box-shadow: 0 1px 3px rgba(110, 40, 210, 0.35);
  }
}
@keyframes mascot-pulse { 0% { transform: scale(0.92); opacity: 0.6; } 100% { transform: scale(1.12); opacity: 1; } }
.cta-illustration {
  display: flex; align-items: center; justify-content: center;
}
.cta-mascot {
  position: absolute; top: 50%; left: 50%; width: 140px; height: 154px;
  transform: translate(-50%, -50%); bottom: auto;
}
.cta-mascot .smsar-logo-mascot { width: 100%; height: 100%; }
.cta-floor {
  position: absolute; bottom: 38px; left: 50%; width: 130px; height: 14px;
  transform: translateX(-48%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.7), transparent 70%);
  filter: blur(10px);
}
.end-cta .note-one { top: 45px; right: 28px; }
.end-cta .note-two { bottom: 45px; left: 20px; }
.hero-visual .bot-shadow { bottom: 63px; width: 145px; height: 20px; opacity: .55; background: radial-gradient(ellipse, rgba(130,70,240,.65), transparent 70%); filter: blur(16px); }
@media (max-width: 1000px) {
  .topbar { padding-inline: 16px; }
  .topbar nav a { padding-inline: 9px; font-size: 13px; }
  .header-actions { gap: 8px; }
  .hero { gap: 10px; }
  .hero-visual .status-card { min-width: 125px; padding: 10px; }
  .hero-visual .card-left { right: -5px; top: 75px; }
  .hero-visual .card-right { left: -5px; bottom: 90px; }
  .folder-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 740px; margin: auto; gap: 34px 42px; }
}
@media (max-width: 780px) {
  .container { width: calc(100% - 32px); }
  .topbar, .topbar.is-scrolled { height: 68px !important; top: 8px; padding-inline: 12px; margin-top: 8px; border-radius: 16px; }
  .topbar .theme-toggle { position: static; min-width: 38px; min-height: 38px; padding: 7px; font-size: 0; }
  .topbar .theme-toggle span { margin: 0; font-size: 20px; }
  .header-actions { gap: 9px; }
  .login-button { min-height: 38px; padding: 8px 10px; font-size: 12px; }
  .login-button span { display: none; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 38px; height: 38px; border: 1px solid var(--home-border); border-radius: 10px; background: transparent; cursor: pointer; }
  .nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--home-ink); transition: transform .2s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .topbar nav { display: none; position: absolute; inset: calc(100% + 8px) 0 auto; margin: 0; padding: 10px; border: 1px solid var(--home-border); border-radius: 16px; background: var(--home-panel); box-shadow: 0 18px 30px #0003; }
  .topbar nav.is-open { display: flex; flex-direction: column; gap: 4px; }
  .topbar nav a { padding: 14px 16px; font-size: 15px; }
  .hero { grid-template-columns: 1fr; padding-top: 25px; overflow: visible; gap: 0; }
  .hero-visual { height: 330px; max-width: 460px; margin-inline: auto; order: -1; overflow: visible; }
  .bot-scale { transform: scale(.66); }
  .hero-visual .card-left { top: 62px; right: -14px !important; transform: scale(.85) rotate(5deg); }
  .hero-visual .card-right { bottom: 55px; left: -14px !important; transform: scale(.85) rotate(-5deg); }
  .hero-visual .bot-shadow { bottom: 32px; }
  .hero-visual .online-pill { bottom: 2px; font-size: 10px; padding: 5px 10px; }
  .hero-visual .orbit { bottom: -14px; width: 280px; height: 280px; transform: rotateX(65deg) !important; }
  .hero-visual .orbit-b { width: 340px; height: 340px; }
  .hero-copy { padding-top: 25px; }
  .hero h1 { font-size: clamp(33px,6vw,47px); }
  .hero-description { font-size: 15px; max-width: 480px; }
  .features { padding: 75px 0 55px; }
  .folder-grid { gap: 30px 24px; }
  .getting-started { padding: 20px 0 55px; }
  .setup-steps { gap: 18px; }
  .setup-steps li { padding: 20px 4px 0; }
  .setup-steps h3 { font-size: 18px; }
  .setup-steps p { font-size: 13px; }
  .end-cta { margin-bottom: 40px; }
}
@media (max-width: 520px) {
  .topbar .brand { font-size: 18px; gap: 6px; }
  .topbar .brand-mark { width: 30px; height: 30px; }
  .header-actions { gap: 6px; }
  .hero-visual { height: 280px; max-width: 340px; }
  .bot-scale { transform: scale(.58); }
  .hero-visual .status-card { display: flex; min-width: 110px; padding: 8px; }
  .hero-visual .card-left { top: 42px; right: -14px !important; transform: scale(.75) rotate(5deg); }
  .hero-visual .card-right { bottom: 50px; left: -14px !important; transform: scale(.75) rotate(-5deg); }
  .hero-visual .orbit-b { width: 300px; height: 300px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .primary-button { width: 100%; }
  .hero .trusted { font-size: 12px; }
  .folder-grid { grid-template-columns: 1fr; max-width: 340px; gap: 36px; }
  .folder-scene { margin-top: 16px; }
  .setup-steps { grid-template-columns: 1fr; gap: 22px; margin-top: 28px; }
  .setup-steps li { padding: 20px 48px 0 0; }
  .step-number { position: absolute; right: 0; top: 22px; }
  .setup-steps h3 { margin-top: 0; }
  .system-dialog { padding: 20px; max-height: calc(100dvh - 24px); width: calc(100% - 24px); border-radius: 20px; }
  .system-dialog-footer { flex-direction: column-reverse; }
  .system-dialog-footer .primary-button { width: 100%; }
  .system-panel { min-height: 0; }
  .system-intro h2 { font-size: 25px; }
  .system-detail-list li { font-size: 13px; padding: 12px; }
}
@media (max-width: 360px) {
  .topbar .brand > span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .smsar-logo-mascot, .mascot-eye-wink, .mascot-eye-wink::after, .mascot-ambient-glow, .brand-svg-eye-right { animation: none !important; }
  .folder-scene .gf-root * { transition: none; }
}

/* Brand Mark Reset - Transparent & Standalone */
.brand-mark,
.dialog-mark {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
}

.smsar-brand-svg {
  display: block;
  width: 32px;
  height: 32px;
  flex: none;
  overflow: visible;
  filter: drop-shadow(0 2px 8px rgba(147, 64, 246, 0.42));
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s ease;
  pointer-events: none;
}

.brand:hover .smsar-brand-svg {
  transform: scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 4px 14px rgba(168, 85, 255, 0.65));
}

.brand-svg-eye-right {
  transform-origin: 234px 223px;
  animation: brand-eye-wink 5.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes brand-eye-wink {
  0%, 88%, 94%, 100% {
    transform: scaleY(1);
  }
  91% {
    transform: scaleY(0.12);
  }
}

.dialog-mark .smsar-brand-svg {
  width: 52px;
  height: 52px;
  margin: 0 auto;
}

/* ─── حماية وضبط مكونات الصفحة ونصوص الترجمة ─── */
[hidden],
.login-button[hidden] {
  display: none !important;
}

/* 1. خط شارة العنوان */
.eyebrow .eyebrow-line,
.eyebrow i {
  display: inline-block !important;
  width: 20px !important;
  height: 1px !important;
  background: #9d74ff !important;
  flex-shrink: 0 !important;
}

.eyebrow span,
.eyebrow span[data-i18n] {
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  display: inline-block !important;
  white-space: nowrap !important;
}

/* 2. نقطة حالة البوت المتصل - إزالة أي خلفية أو إطار عن النص */
.online-pill {
  display: inline-flex !important;
  align-items: center !important;
}

.online-pill .online-dot,
.online-pill i {
  display: inline-block !important;
  background: #4cdd91 !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  margin-left: 6px !important;
  margin-right: 0 !important;
  flex-shrink: 0 !important;
}

.online-pill span,
.online-pill span[data-i18n],
html[data-theme="light"] .online-pill span,
html[data-theme="light"] .online-pill span[data-i18n] {
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  animation: none !important;
}

/* 3. شارات بطاقة الدعوة (جاهز ليرتقي سيرفرك) */
.notification .note-icon,
.notification i {
  display: inline-grid !important;
  place-items: center !important;
  margin-left: 6px !important;
  width: 19px !important;
  height: 19px !important;
  border-radius: 7px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #a37ef3, #7c5bd4) !important;
  box-shadow: 0 0 8px rgba(163, 126, 243, 0.35) !important;
  font-style: normal !important;
  font-size: 11px !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

.notification span,
.notification span[data-i18n] {
  background: transparent !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: inline !important;
  color: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
}


