/* Boot Screen & SaaS Modal Styles - Extracted for Fast Loading */
      /* Opening screen: plain HTML/CSS so it shows before the app bundle has loaded. */
      #boot { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; overflow: hidden;
        background: radial-gradient(900px 620px at 50% 42%, #262b31 0%, #191c20 58%, #111316 100%);
        color: #ece8e0; font: 14px 'Plex Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif; transition: opacity .6s ease, transform .6s ease; }
      #boot.done { opacity: 0; transform: scale(1.03); pointer-events: none; }
      /* a slow light sweep and a faint drafting grid */
      #boot::before { content: ''; position: absolute; inset: -20%;
        background: conic-gradient(from 200deg at 50% 45%, transparent 0 30%, rgba(232,185,49,.045) 47%, transparent 64% 100%); filter: blur(30px);
        animation: bootSweep 9s linear infinite; }
      #boot::after { content: ''; position: absolute; inset: 0; opacity: .5;
        background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
        background-size: 48px 48px; -webkit-mask: radial-gradient(closest-side at 50% 45%, #000 30%, transparent 100%); mask: radial-gradient(closest-side at 50% 45%, #000 30%, transparent 100%); }
      @keyframes bootSweep { to { transform: rotate(360deg); } }
      #boot .stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
      #boot .mark { position: relative; width: 132px; height: 132px; margin-bottom: 30px; }
      #boot .mark::before { content: ''; position: absolute; inset: -38px; border-radius: 50%;
        background: radial-gradient(closest-side, rgba(232,185,49,.32), rgba(232,185,49,0)); opacity: 0; animation: bootHalo 2.4s ease .7s infinite; }
      @keyframes bootHalo { 0% { opacity: 0; transform: scale(.8) } 40% { opacity: 1 } 100% { opacity: 0; transform: scale(1.25) } }
      #boot .mark svg { position: relative; width: 100%; height: 100%; overflow: visible; }
      #boot .tile { opacity: 0; transform-origin: 32px 32px; animation: bootPop .7s cubic-bezier(.2,.9,.25,1.2) .1s forwards; }
      #boot .gold { opacity: 0; transform: translateY(10px); animation: bootUp .55s cubic-bezier(.2,.7,.2,1) .45s forwards; }
      #boot .leaf { opacity: 0; animation: bootFade .5s ease .6s forwards; }
      #boot .inside { opacity: 0; animation: bootFade .3s ease .45s forwards; }
      #boot .gold3d { position: absolute; left: 22.5%; top: 22.5%; width: 27.5%; height: 55%; opacity: 0; transform: translateY(10px); animation: bootUp .55s cubic-bezier(.2,.7,.2,1) .45s forwards; perspective: 120px; perspective-origin: 50% 50%; }
      #boot .door3d { position: absolute; inset: 0; border-radius: 5px; background: linear-gradient(90deg, #e9ad1d, #e2a616 60%, #d89c10); transform-origin: 0 50%; animation: bootSwing 1.7s cubic-bezier(.45,.05,.3,1) .9s both; backface-visibility: hidden; }
      #boot .door3d::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #000; opacity: 0; animation: bootShade 1.7s cubic-bezier(.45,.05,.3,1) .9s both; }
      #boot .door3d i { position: absolute; left: 68.2%; top: 40.9%; width: 14.8%; height: 20.5%; border-radius: 3px; background: #16161f; }
      @keyframes bootSwing { 0%, 100% { transform: rotateY(0deg) } 38%, 54% { transform: rotateY(-74deg) } 84% { transform: rotateY(5deg) } }
      @keyframes bootShade { 0%, 100% { opacity: 0 } 38%, 54% { opacity: .34 } 84% { opacity: 0 } }
      #boot .shine { opacity: 0; animation: bootShine .9s ease 2.3s forwards; }
      @keyframes bootPop { from { opacity: 0; transform: scale(.7) } to { opacity: 1; transform: none } }
      @keyframes bootOpen { to { transform: scaleX(1) } }
      @keyframes bootShine { 0% { opacity: 0; transform: translateX(-30px) } 50% { opacity: .5 } 100% { opacity: 0; transform: translateX(30px) } }
      #boot .name { font: 600 66px/1.25 'Plex Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif; letter-spacing: 0; padding: 0 6px 6px;
        background: linear-gradient(180deg, #fff3cf 0%, #e8b931 70%, #c9971c 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
        opacity: 0; transform: translateY(12px); animation: bootUp .7s cubic-bezier(.2,.7,.2,1) 1.05s forwards; }
      #boot .rule { width: 0; height: 1px; margin: 18px 0 16px; background: linear-gradient(90deg, transparent, #e8b931, transparent); animation: bootRule .8s ease 1.35s forwards; }
      @keyframes bootRule { to { width: 260px } }
      #boot .slogan { font: 400 20px/1.6 'Plex Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif; color: #d9d4ca; direction: rtl; opacity: 0; animation: bootFade .7s ease 1.55s forwards; }
      #boot .latin { margin-top: 10px; font: 600 11px/1 'Plex Arabic', 'Segoe UI', Tahoma, sans-serif; letter-spacing: .55em; color: #7f878e; opacity: 0; animation: bootFade .7s ease 1.75s forwards; padding-inline-start: .55em; }
      #boot .load { width: 300px; margin-top: 38px; opacity: 0; animation: bootFade .5s ease .3s forwards; direction: rtl; }
      #boot .bar { position: relative; height: 6px; border-radius: 6px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); overflow: hidden; }
      #boot .fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 6px; transition: width .35s cubic-bezier(.2,.7,.2,1);
        background: linear-gradient(90deg, #c9971c, #f2c94c 60%, #fff0bf); box-shadow: 0 0 14px rgba(242,201,76,.55); overflow: hidden; }
      #boot .fill::after { content: ''; position: absolute; inset: 0; width: 60px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: bootGlint 1.3s linear infinite; }
      @keyframes bootGlint { from { transform: translateX(300px) } to { transform: translateX(-80px) } }
      #boot .meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; font: 400 13px/1.4 'Plex Arabic', 'Segoe UI', Tahoma, sans-serif; color: #a9a49a; }
      #boot .pct { font-weight: 600; color: #e8b931; direction: ltr; font-variant-numeric: tabular-nums; }
      @keyframes bootUp { to { opacity: 1; transform: none } }
      @keyframes bootFade { to { opacity: 1 } }
      #boot .ver { position: absolute; z-index: 1; bottom: 20px; font-size: 11px; color: #646b72; letter-spacing: .05em; direction: ltr; }
      @media (prefers-reduced-motion: reduce) { #boot *, #boot::before { animation-duration: .01s !important; animation-delay: 0s !important; } }
    
/* --- s3d SaaS Auth & Subscriptions Modal Styling --- */
.s3a-auth-modal {
  width: min(960px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg, #0f172a);
  border: 1px solid var(--rule, #334155);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  color: var(--ink, #f8fafc);
  font-family: inherit;
}
.s3a-auth-head {
  padding: 16px 22px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border-bottom: 1px solid var(--rule, #334155);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.s3a-auth-head .icon-btn {
  color: #f8fafc;
}
:root[data-theme="light"] .s3a-auth-modal {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}
:root[data-theme="light"] .s3a-auth-head {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-color: #cbd5e1;
}
:root[data-theme="light"] .s3a-auth-head .icon-btn {
  color: #0f172a;
}
:root[data-theme="light"] .s3a-auth-tabs {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}
:root[data-theme="light"] .s3a-plan-box {
  background: #f8fafc;
  border-color: #cbd5e1;
}
:root[data-theme="light"] .s3a-form-row label {
  color: #475569;
}
:root[data-theme="light"] .s3a-form-input {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}
.s3a-auth-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 22px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid var(--rule, #1e293b);
  overflow-x: auto;
}
.s3a-auth-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.s3a-auth-tab.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.35);
  color: #22d3ee;
}
.s3a-auth-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}
.s3a-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.s3a-plan-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--rule, #334155);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s;
}
.s3a-plan-box.popular {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.05);
}
.s3a-plan-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fbbf24;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}
.s3a-form-row {
  margin-bottom: 14px;
  text-align: right;
}
.s3a-form-row label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 5px;
}
.s3a-form-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}
.s3a-form-input:focus {
  border-color: #06b6d4;
  outline: none;
}
.s3a-google-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.s3a-google-btn:hover {
  background: #273549;
  border-color: #475569;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}
.s3a-google-btn:active {
  transform: translateY(0);
}


