
[hidden]{display:none!important}

.boot-view{
  width:min(420px,calc(100% - 30px));
  min-height:calc(100vh - 150px);
  margin:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:11px;
  text-align:center;
  color:var(--muted);
}
.boot-view img{
  width:76px;
  height:76px;
  border-radius:22px;
  box-shadow:var(--shadow);
}
.boot-view b{
  color:var(--text);
  font-size:1.15rem;
}
.boot-view span{
  font-size:.78rem;
}


:root{
  --bg:#07101d;--surface:#0d1828;--surface-2:#12213a;--card:#0f1d31;
  --text:#f7f9fc;--muted:#9aa9bd;--line:#243754;--orange:#ff7a0b;
  --orange-soft:#2a190d;--green:#39d98a;--danger:#ff6677;
  --shadow:0 24px 70px rgba(0,0,0,.28);
  color-scheme:dark;
}
html[data-theme="light"]{
  --bg:#eef3f7;--surface:#fff;--surface-2:#edf3f8;--card:#f8fafc;
  --text:#111a29;--muted:#617086;--line:#cad5e1;--orange:#ff7410;
  --orange-soft:#fff0e2;--green:#15945a;--danger:#d63e52;
  --shadow:0 24px 70px rgba(36,55,79,.12);
  color-scheme:light;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:Inter,"Noto Sans Arabic",Arial,sans-serif}
button,input{font:inherit}
a{color:inherit;text-decoration:none}
.ambient{position:fixed;inset:0;pointer-events:none;background:
 radial-gradient(circle at 10% 10%,rgba(255,122,11,.13),transparent 28%),
 radial-gradient(circle at 90% 20%,rgba(46,103,190,.13),transparent 32%)}
.topbar{position:relative;z-index:5;min-height:78px;padding:12px clamp(16px,4vw,58px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(18px)}
.brand img{display:block;width:190px;max-height:54px;object-fit:contain}
.top-actions{display:flex;align-items:center;gap:8px}
.icon-button,.portal-link{min-height:44px;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--text)}
.icon-button{min-width:44px;padding:0 12px;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}
.language-button img{width:20px;height:13px;border-radius:2px}
.portal-link{padding:0 15px;display:flex;align-items:center;font-weight:800;font-size:.82rem}
main{position:relative;z-index:1;min-height:calc(100vh - 140px)}
.auth-view{width:min(1180px,calc(100% - 32px));margin:auto;min-height:calc(100vh - 150px);display:grid;grid-template-columns:1.1fr .8fr;align-items:center;gap:clamp(28px,6vw,90px);padding:50px 0}
.eyebrow{display:inline-flex;color:var(--orange);font-weight:900;letter-spacing:.04em;font-size:.78rem}
.auth-copy h1{font-size:clamp(2.4rem,5vw,5.2rem);line-height:1.08;margin:12px 0 18px;max-width:720px}
.auth-copy>p{font-size:clamp(1rem,1.5vw,1.25rem);line-height:1.9;color:var(--muted);max-width:700px}
.feature-strip{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
.feature-strip span{padding:9px 13px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-size:.78rem;font-weight:800}
.auth-card{padding:28px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(155deg,var(--surface),var(--card));box-shadow:var(--shadow)}
.card-heading span{color:var(--orange);font-size:.74rem;font-weight:900}
.card-heading h2{margin:4px 0;font-size:1.85rem}
.card-heading p{margin:0 0 20px;color:var(--muted);font-size:.82rem;line-height:1.7}
.auth-card label{display:block;margin:14px 0 7px;font-size:.78rem;font-weight:900}
.auth-card input{width:100%;min-height:50px;padding:0 14px;border:1px solid var(--line);border-radius:13px;background:var(--bg);color:var(--text);outline:none}
.auth-card input:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(255,122,11,.14)}
.google-button,.primary-button,.secondary-button,.logout-button{border:0;cursor:pointer;font-weight:900}
.google-button{width:100%;min-height:48px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);color:var(--text);display:flex;align-items:center;justify-content:center;gap:10px}
.google-mark{width:27px;height:27px;border-radius:8px;background:#fff;color:#4285f4;display:grid;place-items:center;font-weight:1000}
.separator{display:flex;align-items:center;gap:10px;margin:18px 0;color:var(--muted);font-size:.72rem}
.separator:before,.separator:after{content:"";height:1px;background:var(--line);flex:1}
.turnstile-slot{min-height:67px;margin-top:14px;overflow:hidden}
.primary-button{width:100%;min-height:50px;margin-top:10px;border-radius:13px;background:linear-gradient(135deg,#ff8a20,var(--orange));color:#fff;box-shadow:0 12px 28px rgba(255,122,11,.2)}
.primary-button:disabled,.google-button:disabled{opacity:.55;cursor:not-allowed}
.primary-button.inline{width:auto;display:inline-flex;align-items:center;padding:0 20px}
.auth-links{display:flex;justify-content:space-between;gap:15px;margin-top:16px;color:var(--muted);font-size:.72rem}
.auth-links a:hover{color:var(--orange)}
.message{margin:10px 0 0;padding:10px 12px;border-radius:10px;background:var(--orange-soft);font-size:.72rem;line-height:1.55}
.message[data-type="error"]{color:var(--danger)}
.message[data-type="success"]{color:var(--green)}
.app-view{width:min(1500px,100%);margin:auto;display:grid;grid-template-columns:260px 1fr;min-height:calc(100vh - 78px)}
.sidebar{position:sticky;top:0;height:calc(100vh - 78px);padding:22px 16px;border-inline-end:1px solid var(--line);background:var(--surface)}
.sidebar-account{display:flex;align-items:center;gap:11px;padding:12px;border:1px solid var(--line);border-radius:15px;background:var(--card)}
.sidebar-account img{width:42px;height:42px;border-radius:12px}
.sidebar-account b,.sidebar-account small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-account small{max-width:150px;margin-top:3px;color:var(--muted);font-size:.65rem}
.sidebar nav{display:grid;gap:7px;margin:20px 0}
.nav-item{min-height:48px;padding:0 13px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--muted);display:flex;align-items:center;gap:12px;cursor:pointer;text-align:start}
.nav-item span{width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:var(--surface-2)}
.nav-item.active{border-color:rgba(255,122,11,.3);background:var(--orange-soft);color:var(--orange)}
.logout-button{width:100%;min-height:46px;border-radius:12px;background:transparent;color:var(--danger);border:1px solid color-mix(in srgb,var(--danger) 35%,var(--line))}
.workspace{padding:30px clamp(18px,4vw,55px) 70px}
.workspace-header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}
.workspace-header h1{margin:4px 0 0;font-size:2.1rem}
.secondary-button{min-height:44px;padding:0 15px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);display:flex;align-items:center}
.module{animation:fade .2s ease}
@keyframes fade{from{opacity:0;transform:translateY(5px)}}
.welcome-panel{min-height:190px;padding:28px;border:1px solid var(--line);border-radius:24px;background:
 radial-gradient(circle at 10% 0%,rgba(255,122,11,.17),transparent 38%),
 linear-gradient(145deg,var(--surface),var(--card));display:flex;justify-content:space-between;align-items:center;box-shadow:var(--shadow)}
.welcome-panel h2{font-size:2rem;margin:10px 0 8px}
.welcome-panel p{max-width:700px;color:var(--muted);line-height:1.8}
.status-chip{display:inline-flex;padding:7px 10px;border-radius:999px;background:var(--orange-soft);color:var(--orange);font-size:.68rem;font-weight:900}
.web-badge{width:110px;height:110px;border:1px solid var(--line);border-radius:28px;background:var(--bg);display:grid;place-items:center;text-align:center;font-size:1.7rem;font-weight:1000;color:var(--orange)}
.web-badge small{font-size:.7rem;color:var(--muted)}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}
.stats-grid article{min-height:130px;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.stats-grid span,.stats-grid small{display:block;color:var(--muted);font-size:.68rem}
.stats-grid b{display:block;margin:12px 0 5px;font-size:1.65rem}
.roadmap-card{padding:22px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.roadmap-head{display:flex;justify-content:space-between;align-items:center}
.roadmap-head span{color:var(--muted);font-size:.7rem}
.roadmap-head h3{margin:4px 0 0}
.progress-label{color:var(--orange)!important;font-weight:900}
.progress{height:7px;margin:18px 0;background:var(--surface-2);border-radius:999px;overflow:hidden}
.progress span{display:block;width:25%;height:100%;background:var(--orange)}
.roadmap-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.roadmap-grid div{min-height:88px;padding:12px;border:1px solid var(--line);border-radius:14px;color:var(--muted);display:flex;align-items:center;gap:9px}
.roadmap-grid b{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--surface-2)}
.roadmap-grid .done{border-color:rgba(57,217,138,.35);color:var(--text)}
.roadmap-grid .done b{background:rgba(57,217,138,.14);color:var(--green)}
.placeholder-card{min-height:480px;padding:40px;border:1px solid var(--line);border-radius:24px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.placeholder-icon{width:90px;height:90px;border-radius:25px;background:var(--orange-soft);display:grid;place-items:center;color:var(--orange);font-size:2.2rem}
.placeholder-card h2{font-size:2rem;margin:18px 0 8px}
.placeholder-card p{max-width:600px;color:var(--muted);line-height:1.8}
footer{position:relative;z-index:2;min-height:62px;padding:0 clamp(16px,4vw,58px);border-top:1px solid var(--line);display:flex;align-items:center;gap:18px;color:var(--muted);font-size:.7rem}
footer span{margin-inline-end:auto}
@media(max-width:900px){
  .auth-view{grid-template-columns:1fr;padding:34px 0}
  .auth-copy{text-align:center}
  .auth-copy h1,.auth-copy>p{margin-inline:auto}
  .feature-strip{justify-content:center}
  .app-view{grid-template-columns:1fr}
  .sidebar{position:static;height:auto;border-inline-end:0;border-bottom:1px solid var(--line)}
  .sidebar nav{grid-template-columns:repeat(5,1fr);overflow:auto}
  .nav-item{justify-content:center;padding:0 9px}
  .nav-item b{display:none}
  .logout-button{margin-top:8px}
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .roadmap-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:600px){
  .topbar{padding:9px 11px;min-height:66px}
  .brand img{width:142px}
  .portal-link{display:none}
  .language-button span{display:none}
  .auth-view{width:calc(100% - 20px)}
  .auth-copy h1{font-size:2.35rem}
  .auth-card{padding:20px 16px;border-radius:20px}
  .app-view{min-height:calc(100vh - 66px)}
  .sidebar{padding:10px}
  .sidebar-account{display:none}
  .sidebar nav{margin:0;gap:4px}
  .nav-item{min-width:52px}
  .logout-button{min-height:40px}
  .workspace{padding:18px 10px 60px}
  .workspace-header h1{font-size:1.55rem}
  .secondary-button{font-size:.65rem;padding:0 10px}
  .welcome-panel{min-height:0;padding:18px;border-radius:18px}
  .welcome-panel h2{font-size:1.45rem}
  .welcome-panel p{font-size:.74rem}
  .web-badge{width:70px;height:70px;border-radius:20px;font-size:1.1rem}
  .stats-grid{gap:8px}
  .stats-grid article{min-height:104px;padding:13px}
  .stats-grid b{font-size:1.25rem}
  .roadmap-grid{grid-template-columns:1fr}
  .roadmap-grid div{min-height:66px}
  footer{padding:0 12px;gap:10px;flex-wrap:wrap}
}


/* AF ShopBook Web V0.3 — Auth UX and Web Preview */

.auth-view{
  grid-template-columns:minmax(360px,.72fr) minmax(560px,1.28fr);
  gap:clamp(34px,5vw,82px);
}

.auth-copy{
  min-width:0;
}

.auth-copy h1{
  max-width:820px;
}

.auth-card{
  align-self:center;
}

.google-button{
  min-height:52px;
  border-color:#d7dde7;
  background:#fff;
  color:#202124;
  box-shadow:0 4px 14px rgba(0,0,0,.08);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.google-button:hover{
  transform:translateY(-1px);
  border-color:#b9c3d0;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
}

.google-logo{
  width:21px;
  height:21px;
  flex:0 0 auto;
}

.security-check{
  margin-top:14px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:color-mix(in srgb,var(--surface-2) 72%,transparent);
}

.security-check-heading{
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:8px;
}

.security-shield{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:rgba(57,217,138,.13);
  color:var(--green);
  font-weight:1000;
}

.security-check-heading b,
.security-check-heading small{
  display:block;
}

.security-check-heading b{
  font-size:.72rem;
}

.security-check-heading small{
  margin-top:2px;
  color:var(--muted);
  font-size:.61rem;
}

.turnstile-slot{
  min-height:65px;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
}

.turnstile-slot iframe{
  max-width:100%;
}

.turnstile-loading{
  color:var(--muted);
  font-size:.65rem;
}

.web-preview{
  margin-top:28px;
  max-width:780px;
}

.preview-browser{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(145deg,var(--surface),var(--card));
  box-shadow:0 28px 80px rgba(0,0,0,.25);
  transform:perspective(1100px) rotateY(-2deg) rotateX(1deg);
  transform-origin:center;
}

html[dir="ltr"] .preview-browser{
  transform:perspective(1100px) rotateY(2deg) rotateX(1deg);
}

.preview-browser-bar{
  min-height:43px;
  padding:0 14px;
  display:flex;
  align-items:center;
  gap:7px;
  border-bottom:1px solid var(--line);
  background:var(--bg);
}

.preview-browser-bar span{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#536379;
}

.preview-browser-bar span:first-child{background:#ff7a0b}
.preview-browser-bar span:nth-child(2){background:#f0b947}
.preview-browser-bar span:nth-child(3){background:#39d98a}

.preview-browser-bar b{
  margin-inline-start:8px;
  color:var(--muted);
  font-size:.63rem;
  direction:ltr;
}

.preview-app{
  min-height:330px;
  display:grid;
  grid-template-columns:76px 1fr;
}

.preview-sidebar{
  padding:16px 13px;
  border-inline-end:1px solid var(--line);
  background:color-mix(in srgb,var(--surface-2) 75%,transparent);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.preview-sidebar img{
  width:44px;
  height:44px;
  object-fit:contain;
  margin-bottom:12px;
}

.preview-sidebar i{
  width:38px;
  height:36px;
  border-radius:10px;
  background:var(--surface);
  border:1px solid var(--line);
}

.preview-sidebar i.active{
  border-color:rgba(255,122,11,.45);
  background:var(--orange-soft);
}

.preview-content{
  min-width:0;
  padding:20px;
}

.preview-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.preview-title-row small,
.preview-title-row strong{
  display:block;
}

.preview-title-row small{
  color:var(--orange);
  font-size:.62rem;
  font-weight:900;
}

.preview-title-row strong{
  margin-top:3px;
  font-size:1.12rem;
}

.preview-title-row>span{
  padding:7px 10px;
  border-radius:9px;
  background:var(--orange-soft);
  color:var(--orange);
  font-size:.65rem;
  font-weight:1000;
}

.preview-metrics{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin:17px 0 14px;
}

.preview-metrics article{
  min-height:86px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--bg);
}

.preview-metrics small,
.preview-metrics b,
.preview-metrics em{
  display:block;
}

.preview-metrics small{
  color:var(--muted);
  font-size:.57rem;
}

.preview-metrics b{
  margin-top:8px;
  font-size:1.25rem;
}

.preview-metrics em{
  margin-top:2px;
  color:var(--orange);
  font-size:.53rem;
  font-style:normal;
}

.preview-chart{
  height:105px;
  padding:12px 14px 8px;
  border:1px solid var(--line);
  border-radius:14px;
  background:
    linear-gradient(to bottom,transparent 24%,var(--line) 25%,transparent 26%,transparent 49%,var(--line) 50%,transparent 51%,transparent 74%,var(--line) 75%,transparent 76%),
    var(--bg);
  display:flex;
  align-items:flex-end;
  gap:9px;
}

.preview-chart span{
  flex:1;
  min-width:10px;
  border-radius:5px 5px 2px 2px;
  background:#66758a;
}

.preview-chart span.orange{
  background:var(--orange);
  box-shadow:0 0 22px rgba(255,122,11,.28);
}

.preview-activity{
  display:grid;
  gap:6px;
  margin-top:12px;
}

.preview-activity span{
  height:8px;
  border-radius:999px;
  background:var(--surface-2);
}

.preview-activity span:nth-child(1){width:92%}
.preview-activity span:nth-child(2){width:73%}
.preview-activity span:nth-child(3){width:84%}

.preview-caption{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:13px;
  padding-inline:5px;
}

.preview-caption b{
  color:var(--text);
  font-size:.78rem;
}

.preview-caption span{
  color:var(--muted);
  font-size:.65rem;
  line-height:1.55;
  text-align:end;
}

@media(max-width:1100px){
  .auth-view{
    grid-template-columns:minmax(330px,.8fr) minmax(480px,1.2fr);
  }
  .preview-app{min-height:300px}
}

@media(max-width:900px){
  .auth-view{
    grid-template-columns:1fr;
  }
  .auth-copy{
    order:1;
  }
  .auth-card{
    order:2;
    width:min(100%,520px);
    margin-inline:auto;
  }
  .web-preview{
    margin-inline:auto;
  }
  .preview-caption{
    text-align:start;
  }
}

@media(max-width:600px){
  .web-preview{
    margin-top:22px;
  }
  .preview-browser{
    border-radius:17px;
    transform:none;
  }
  html[dir="ltr"] .preview-browser{
    transform:none;
  }
  .preview-app{
    grid-template-columns:54px 1fr;
    min-height:275px;
  }
  .preview-sidebar{
    padding-inline:8px;
  }
  .preview-sidebar img{
    width:36px;
    height:36px;
  }
  .preview-sidebar i{
    width:32px;
    height:31px;
  }
  .preview-content{
    padding:13px;
  }
  .preview-metrics{
    gap:6px;
  }
  .preview-metrics article{
    min-height:75px;
    padding:9px;
  }
  .preview-metrics b{
    font-size:1rem;
  }
  .preview-chart{
    height:85px;
    gap:6px;
  }
  .preview-caption{
    display:block;
  }
  .preview-caption span{
    display:block;
    margin-top:4px;
    text-align:start;
  }
  .security-check{
    padding:9px;
  }
}


/* AF ShopBook Web V0.4 — reviewed auth layout */
.auth-view{display:block!important;width:100%;min-height:calc(100vh - 140px);padding:34px clamp(18px,4vw,64px)}
.auth-stage{width:min(1320px,100%);min-height:720px;margin:auto;display:grid;grid-template-columns:minmax(0,1.32fr) minmax(380px,.68fr);gap:clamp(30px,4vw,64px);align-items:center}
.product-intro{min-width:0;display:grid;gap:24px}
.product-copy{max-width:760px}
.product-copy h1{font-size:clamp(2.4rem,4.4vw,4.6rem);line-height:1.14;margin:10px 0 14px;letter-spacing:-.03em}
.product-copy>p{max-width:720px;margin:0;color:var(--muted);font-size:clamp(.95rem,1.25vw,1.14rem);line-height:1.85}
.product-copy .feature-strip{margin-top:18px}
.auth-card{width:100%;max-width:470px;justify-self:end;padding:26px;border-radius:22px}
html[dir="ltr"] .auth-card{justify-self:start}
.card-heading h2{font-size:1.7rem}
.google-button{height:50px;min-height:50px;padding:0 16px;display:flex;align-items:center;justify-content:center;gap:10px;overflow:hidden}
.google-button .google-logo{display:block!important;width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important;max-height:20px!important;flex:0 0 20px!important;transform:none!important}
.google-button span{font-size:.86rem;line-height:1;white-space:nowrap}
.security-check{min-height:112px}
.turnstile-slot{min-height:65px;position:relative}
.turnstile-slot>div{max-width:100%;margin-inline:auto}
.turnstile-slot iframe{display:block!important;max-width:100%!important;margin-inline:auto!important}
.turnstile-error{width:100%;padding:10px;border:1px solid color-mix(in srgb,var(--danger) 45%,var(--line));border-radius:10px;color:var(--danger);font-size:.65rem;text-align:center}
.turnstile-retry{margin-top:7px;border:0;background:transparent;color:var(--orange);font-weight:900;cursor:pointer}
.web-preview{margin-top:0;max-width:780px}
.preview-browser{transform:none!important;border-radius:20px;box-shadow:0 26px 70px rgba(0,0,0,.28)}
.preview-browser-bar{justify-content:space-between;direction:ltr}
.preview-dots{display:flex;gap:6px}
.preview-browser-bar .preview-dots span{display:block}
.preview-live{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:.58rem;direction:rtl}
.preview-live i{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(57,217,138,.1)}
.preview-app{min-height:330px;grid-template-columns:70px 1fr}
.preview-sidebar{gap:10px}
.preview-content{padding:18px}
.preview-title-row strong{font-size:1.18rem}
.preview-metrics article{min-height:82px}
.preview-lower{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(170px,.55fr);gap:10px}
.preview-chart{height:130px}
.preview-list{display:grid;gap:8px}
.preview-list>div{min-height:38px;padding:8px 9px;border:1px solid var(--line);border-radius:10px;background:var(--bg);display:grid;grid-template-columns:9px minmax(0,1fr) auto;align-items:center;gap:7px}
.preview-list i{width:7px;height:7px;border-radius:50%;background:var(--orange)}
.preview-list i.expense{background:#ff6677}.preview-list i.sync{background:var(--green)}
.preview-list span{color:var(--muted);font-size:.52rem}.preview-list b{font-size:.57rem}
.preview-caption{margin-top:10px}
.preview-caption b{font-size:.72rem}.preview-caption span{font-size:.6rem}
@media(max-width:1050px){.auth-stage{grid-template-columns:1fr;max-width:780px}.product-copy{text-align:center;margin:auto}.product-copy .feature-strip{justify-content:center}.auth-card{justify-self:center!important;order:2}.product-intro{order:1}.web-preview{margin-inline:auto}.auth-view{padding-top:28px}.auth-stage{min-height:0}}
@media(max-width:600px){.auth-view{padding:20px 10px 30px}.auth-stage{gap:20px}.product-copy h1{font-size:2.25rem}.product-copy>p{font-size:.83rem}.auth-card{padding:18px 15px;border-radius:18px}.web-preview{width:100%}.preview-browser-bar{padding-inline:10px}.preview-browser-bar b{font-size:.54rem}.preview-live span{display:none}.preview-app{grid-template-columns:48px 1fr;min-height:270px}.preview-sidebar{padding:10px 7px}.preview-sidebar img{width:32px;height:32px}.preview-sidebar i{width:29px;height:28px}.preview-content{padding:11px}.preview-metrics{gap:5px}.preview-metrics article{min-height:70px;padding:8px}.preview-metrics b{font-size:.95rem}.preview-lower{grid-template-columns:1fr}.preview-chart{height:90px}.preview-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.preview-list>div{display:block;min-height:55px;padding:7px;text-align:center}.preview-list i{display:block;margin:0 auto 5px}.preview-list span,.preview-list b{display:block}.preview-caption{display:block;text-align:center}.preview-caption span{display:block;margin-top:4px;text-align:center}.google-button span{font-size:.78rem}}


/* ================================================================
   AF ShopBook Web V0.5 — reviewed responsive authentication layout
   ================================================================ */

.auth-view{
  display:block!important;
  width:100%;
  min-height:calc(100dvh - 140px);
  padding:28px clamp(18px,3.5vw,56px) 34px;
}

.auth-stage{
  width:min(1380px,100%);
  margin-inline:auto;
  display:grid;
  grid-template-columns:minmax(340px,430px) minmax(0,1fr);
  grid-template-areas:"auth product";
  gap:clamp(26px,4vw,62px);
  align-items:start;
  direction:ltr;
}

.auth-card{
  grid-area:auth;
  direction:rtl;
  width:100%;
  max-width:430px;
  justify-self:start;
  align-self:start;
  margin-top:8px;
  padding:24px;
  border-radius:22px;
}

.product-intro{
  grid-area:product;
  direction:rtl;
  min-width:0;
  display:grid;
  gap:18px;
}

html[dir="ltr"] .auth-card,
html[dir="ltr"] .product-intro{
  direction:ltr;
}

.product-copy{
  max-width:820px;
  margin-inline-start:auto;
}

html[dir="ltr"] .product-copy{
  margin-inline-start:0;
  margin-inline-end:auto;
}

.product-copy h1{
  max-width:820px;
  margin:8px 0 10px;
  font-size:clamp(2.35rem,3.8vw,4.2rem);
  line-height:1.12;
  letter-spacing:-.025em;
}

.product-copy>p{
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:clamp(.9rem,1.12vw,1.08rem);
  line-height:1.8;
}

.product-copy .feature-strip{
  margin-top:15px;
}

.web-preview{
  width:100%;
  max-width:860px;
  margin:0;
  margin-inline-start:auto;
}

html[dir="ltr"] .web-preview{
  margin-inline-start:0;
  margin-inline-end:auto;
}

.preview-browser{
  transform:none!important;
  overflow:hidden;
  border-radius:20px;
  box-shadow:0 24px 64px rgba(0,0,0,.24);
}

.preview-browser-bar{
  min-height:40px;
  padding-inline:13px;
}

.preview-app{
  min-height:305px;
  grid-template-columns:64px minmax(0,1fr);
}

.preview-sidebar{
  padding:13px 10px;
  gap:9px;
}

.preview-sidebar img{
  width:38px;
  height:38px;
  object-fit:contain;
}

.preview-sidebar i{
  width:34px;
  height:33px;
}

.preview-content{
  padding:16px;
}

.preview-title-row strong{
  font-size:1.08rem;
}

.preview-metrics{
  gap:8px;
  margin:14px 0 11px;
}

.preview-metrics article{
  min-height:75px;
  padding:10px;
}

.preview-metrics b{
  margin-top:7px;
  font-size:1.14rem;
}

.preview-lower{
  display:grid;
  grid-template-columns:minmax(0,1.42fr) minmax(145px,.58fr);
  gap:9px;
}

.preview-chart{
  height:112px;
  gap:7px;
}

.preview-list{
  gap:6px;
}

.preview-list>div{
  min-height:33px;
  padding:6px 7px;
}

.preview-caption{
  margin-top:8px;
}

.preview-caption b{
  font-size:.7rem;
}

.preview-caption span{
  font-size:.58rem;
}

.card-heading h2{
  font-size:1.62rem;
}

.card-heading p{
  margin-bottom:16px;
}

.google-button{
  min-height:48px;
}

.google-button .google-logo{
  display:block!important;
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  max-width:20px!important;
  max-height:20px!important;
  flex:0 0 20px!important;
}

.auth-card label{
  margin:12px 0 6px;
}

.auth-card input{
  min-height:47px;
}

.separator{
  margin:14px 0;
}

.security-check{
  min-height:0;
  margin-top:12px;
  padding:9px;
}

.security-check-heading{
  margin-bottom:7px;
}

.turnstile-shell{
  position:relative;
  width:100%;
  min-height:65px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:10px;
}

.turnstile-shell[data-state="loading"]::before{
  content:"جاري تحميل التحقق الأمني...";
  color:var(--muted);
  font-size:.64rem;
}

html[lang="en"] .turnstile-shell[data-state="loading"]::before{
  content:"Loading secure verification...";
}

html[lang="fr"] .turnstile-shell[data-state="loading"]::before{
  content:"Chargement de la vérification...";
}

.turnstile-shell[data-state="error"]::before{
  content:"تعذر تحميل التحقق الأمني. حدّث الصفحة مرة واحدة.";
  width:100%;
  padding:10px;
  border:1px solid color-mix(in srgb,var(--danger) 48%,var(--line));
  border-radius:9px;
  color:var(--danger);
  text-align:center;
  font-size:.62rem;
  line-height:1.5;
}

html[lang="en"] .turnstile-shell[data-state="error"]::before{
  content:"Security verification could not load. Refresh the page once.";
}

html[lang="fr"] .turnstile-shell[data-state="error"]::before{
  content:"La vérification n’a pas pu se charger. Actualisez la page.";
}

.turnstile-shell[data-state="verified"]{
  min-height:0;
}

.turnstile-shell>div,
.turnstile-shell iframe{
  max-width:100%!important;
  margin-inline:auto!important;
}

.primary-button{
  min-height:48px;
}

.auth-links{
  margin-top:13px;
}

/* Keep the two-column app presentation at common 960px laptop widths. */
@media(max-width:1080px){
  .auth-view{
    padding-inline:20px;
  }

  .auth-stage{
    grid-template-columns:minmax(320px,380px) minmax(0,1fr);
    gap:24px;
  }

  .product-copy h1{
    font-size:clamp(2.2rem,4.6vw,3.5rem);
  }

  .preview-app{
    min-height:285px;
  }

  .preview-content{
    padding:13px;
  }

  .preview-list{
    display:none;
  }

  .preview-lower{
    grid-template-columns:1fr;
  }

  .preview-chart{
    height:104px;
  }
}

/* Stack only on true tablet/mobile widths. Login is shown first. */
@media(max-width:820px){
  .auth-view{
    padding:20px 14px 32px;
  }

  .auth-stage{
    width:min(720px,100%);
    grid-template-columns:1fr;
    grid-template-areas:
      "auth"
      "product";
    gap:24px;
  }

  .auth-card{
    justify-self:center;
    max-width:520px;
    margin-top:0;
  }

  .product-copy{
    margin-inline:auto;
    text-align:center;
  }

  .product-copy .feature-strip{
    justify-content:center;
  }

  .web-preview{
    margin-inline:auto;
  }

  .preview-caption{
    text-align:center;
  }

  .preview-caption span{
    text-align:center;
  }
}

@media(max-width:560px){
  .auth-view{
    padding:15px 10px 26px;
  }

  .auth-stage{
    gap:18px;
  }

  .auth-card{
    padding:18px 15px;
    border-radius:18px;
  }

  .product-copy h1{
    font-size:2.15rem;
  }

  .product-copy>p{
    font-size:.82rem;
  }

  .web-preview{
    width:100%;
  }

  .preview-browser{
    border-radius:16px;
  }

  .preview-live span{
    display:none;
  }

  .preview-app{
    min-height:252px;
    grid-template-columns:48px minmax(0,1fr);
  }

  .preview-sidebar{
    padding:9px 7px;
  }

  .preview-sidebar img{
    width:31px;
    height:31px;
  }

  .preview-sidebar i{
    width:28px;
    height:27px;
  }

  .preview-content{
    padding:10px;
  }

  .preview-metrics{
    gap:5px;
  }

  .preview-metrics article{
    min-height:66px;
    padding:7px;
  }

  .preview-metrics small{
    font-size:.49rem;
  }

  .preview-metrics b{
    font-size:.9rem;
  }

  .preview-chart{
    height:82px;
  }

  .preview-caption{
    display:block;
  }

  .preview-caption span{
    display:block;
    margin-top:4px;
  }

  .google-button span{
    font-size:.76rem;
  }
}

/* AF ShopBook Web V0.6 — definitive auth/app visibility switch */

html body #bootView[hidden],
html body #authView[hidden],
html body #appView[hidden],
html body .module[hidden],
html body [hidden] {
  display: none !important;
}


/* AF ShopBook Web V0.7 — real Sales module */
.sales-module{display:grid;gap:16px}
.module-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:20px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.module-toolbar h2{margin:4px 0;font-size:1.9rem}
.module-toolbar p{margin:0;color:var(--muted);font-size:.78rem}
.toolbar-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.search-box{width:min(310px,100%);min-height:46px;padding-inline:12px;display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.search-box span{color:var(--muted);font-size:1.15rem}
.search-box input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--text)}
.filter-select{min-height:46px;padding-inline:12px 34px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--text);outline:0}
.refresh-module-button{gap:7px}.refresh-module-button b{font-size:.72rem}
.sales-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.sales-summary-card{min-height:126px;padding:17px;border:1px solid var(--line);border-radius:17px;background:linear-gradient(145deg,var(--surface),var(--card))}
.sales-summary-card span,.sales-summary-card small{display:block;color:var(--muted);font-size:.66rem}
.sales-summary-card b{display:block;margin:12px 0 6px;font-variant-numeric:tabular-nums;font-size:1.55rem;direction:ltr;unicode-bidi:isolate;text-align:start}
.sales-list-card{overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.sales-list-heading{min-height:76px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line)}
.sales-list-heading h3{margin:0 0 3px}.sales-list-heading p{margin:0;color:var(--muted);font-size:.65rem}
.module-state{min-height:260px;padding:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;color:var(--muted)}
.module-state b{color:var(--text)}.module-state p{max-width:480px;margin:0;font-size:.72rem;line-height:1.7}
.state-icon{width:56px;height:56px;display:grid;place-items:center;border:1px solid var(--line);border-radius:17px;background:var(--surface-2);color:var(--orange);font-size:1.55rem;font-weight:1000}
.state-spinner{width:38px;height:38px;border:3px solid var(--line);border-top-color:var(--orange);border-radius:50%;animation:salesSpin .8s linear infinite}
@keyframes salesSpin{to{transform:rotate(360deg)}}.error-state .state-icon{color:var(--danger)}
.sales-table-wrap{overflow:auto}.sales-table{width:100%;border-collapse:collapse;min-width:800px}
.sales-table th,.sales-table td{padding:14px 16px;border-bottom:1px solid var(--line);text-align:start;vertical-align:middle}
.sales-table th{color:var(--muted);background:color-mix(in srgb,var(--surface-2) 65%,transparent);font-size:.64rem;font-weight:900}
.sales-table td{font-size:.73rem}.sales-table tbody tr{transition:background .15s ease}.sales-table tbody tr:hover{background:color-mix(in srgb,var(--surface-2) 55%,transparent)}
.sale-primary,.sale-secondary{display:block}.sale-primary{color:var(--text);font-weight:900}.sale-secondary{margin-top:3px;color:var(--muted);font-size:.61rem}
.sale-amount{color:var(--text);font-size:.88rem;font-weight:1000;font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;white-space:nowrap}
.payment-badge{display:inline-flex;min-height:28px;padding:0 9px;align-items:center;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--text);font-size:.62rem;font-weight:800}
.sales-mobile-cards{display:none}.sales-mobile-card{padding:14px;border-bottom:1px solid var(--line)}.sales-mobile-card:last-child{border-bottom:0}
.sales-mobile-card-head,.sales-mobile-card-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.sales-mobile-card-head{margin-bottom:12px}
.sales-mobile-card-row{padding:7px 0;border-top:1px dashed color-mix(in srgb,var(--line) 75%,transparent)}
.sales-mobile-card-row span{color:var(--muted);font-size:.63rem}.sales-mobile-card-row b{font-size:.7rem;text-align:end}
@media(max-width:1100px){.module-toolbar{align-items:stretch;flex-direction:column}.toolbar-actions{justify-content:stretch}.search-box{flex:1 1 260px}.sales-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.module-toolbar{padding:16px;border-radius:17px}.module-toolbar h2{font-size:1.5rem}.toolbar-actions{display:grid;grid-template-columns:1fr 1fr}.search-box{width:100%;grid-column:1/-1}.filter-select,.refresh-module-button{width:100%}.sales-summary-grid{gap:8px}.sales-summary-card{min-height:105px;padding:13px}.sales-summary-card b{font-size:1.2rem}.sales-list-heading{align-items:flex-start;flex-direction:column}.sales-table{display:none}.sales-mobile-cards{display:block}}
@media(max-width:410px){.sales-summary-grid{grid-template-columns:1fr}}
