/* Retainly Mobile App Ready Layer - 2026-07-03
   الهدف: جعل بوابة العميل Mobile-first وقابلة للتحويل لتطبيق React Native لاحقًا. */
:root{
  --rt-app-primary:#075f7a;
  --rt-app-primary-2:#087a9e;
  --rt-app-blue:#1479e8;
  --rt-app-teal:#12b8a6;
  --rt-app-bg:#f6fbff;
  --rt-app-surface:#ffffff;
  --rt-app-border:#dfeaf3;
  --rt-app-text:#0f263b;
  --rt-app-muted:#68778a;
  --rt-app-shadow:0 14px 34px rgba(15,38,59,.08);
  --rt-app-radius-sm:12px;
  --rt-app-radius-md:16px;
  --rt-app-radius-lg:22px;
  --rt-app-radius-xl:28px;
  --rt-app-space-1:6px;
  --rt-app-space-2:10px;
  --rt-app-space-3:14px;
  --rt-app-space-4:18px;
  --rt-app-space-5:24px;
  --rt-app-tabbar-height:74px;
  --rt-safe-bottom:env(safe-area-inset-bottom,0px);
  --rt-safe-top:env(safe-area-inset-top,0px);
}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{touch-action:manipulation;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,a,input,select,textarea{-webkit-tap-highlight-color:rgba(20,121,232,.12)}
img,svg{max-width:100%}

/* عناصر تصميم قابلة لإعادة الاستخدام في التطبيق */
.rt-app-surface{background:var(--rt-app-surface);border:1px solid var(--rt-app-border);border-radius:var(--rt-app-radius-lg);box-shadow:var(--rt-app-shadow)}
.rt-app-touch{min-height:48px;min-width:48px}

/* Mobile app shell */
@media(max-width:820px){
  body:not(.login-body){
    background:linear-gradient(180deg,#fbfdff 0%,#f4faff 100%)!important;
    padding-bottom:calc(var(--rt-app-tabbar-height) + var(--rt-safe-bottom) + 14px)!important;
  }
  body.menu-open{overflow:hidden!important}
  body:not(.login-body) .app{display:block!important;min-height:100dvh!important}
  body:not(.login-body) .main,
  body.home-page .main,
  body.store-page .main,
  body.retainly-unified-page-shell .main.retainly-unified-main{
    width:100%!important;
    max-width:none!important;
    min-height:auto!important;
    margin:0!important;
    padding:calc(16px + var(--rt-safe-top)) 14px calc(96px + var(--rt-safe-bottom))!important;
    overflow:hidden!important;
  }
  body:not(.login-body) .sidebar{
    position:fixed!important;
    top:0!important;
    right:0!important;left:auto!important;
    bottom:0!important;
    width:min(344px,88vw)!important;
    max-width:88vw!important;
    height:100dvh!important;
    transform:translateX(105%)!important;
    transition:transform .26s ease!important;
    z-index:90!important;
    padding:22px 16px calc(22px + var(--rt-safe-bottom))!important;
    box-shadow:-24px 0 54px rgba(15,38,59,.18)!important;
    border-inline-start:1px solid var(--rt-app-border)!important;
    border-inline-end:0!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
  }
    body.menu-open:not(.login-body) .sidebar{transform:translateX(0)!important}
  body:not(.login-body) .sidebar-overlay{display:none!important;position:fixed!important;inset:0!important;background:rgba(15,38,59,.34)!important;backdrop-filter:blur(4px)!important;z-index:85!important}
  body.menu-open:not(.login-body) .sidebar-overlay{display:block!important}
  body:not(.login-body) .close-menu{display:grid!important;place-items:center!important;position:absolute!important;top:16px!important;inset-inline-start:16px!important;width:40px!important;height:40px!important;border:1px solid var(--rt-app-border)!important;border-radius:50%!important;background:#fff!important;color:var(--rt-app-text)!important;font-size:24px!important;line-height:1!important;z-index:2!important}
  body:not(.login-body) .mobile-sidebar-toggle{
    display:grid!important;
    place-items:center!important;
    position:fixed!important;
    top:calc(12px + var(--rt-safe-top))!important;
    right:12px!important;
    left:auto!important;
    width:46px!important;
    height:46px!important;
    border:1px solid var(--rt-app-border)!important;
    border-radius:50%!important;
    background:rgba(255,255,255,.94)!important;
    color:var(--rt-app-primary)!important;
    box-shadow:0 10px 22px rgba(15,38,59,.12)!important;
    z-index:78!important;
    font-size:0!important;
  }
  body:not(.login-body) .mobile-sidebar-toggle:before{content:"☰"!important;font-size:21px!important;font-weight:900!important;line-height:1!important;color:var(--rt-app-primary)!important}
  body.menu-open:not(.login-body) .mobile-sidebar-toggle{display:none!important}

  /* Bottom app navigation */
  .retainly-app-bottom-nav{
    position:fixed;
    inset-inline:10px;
    bottom:calc(8px + var(--rt-safe-bottom));
    height:var(--rt-app-tabbar-height);
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:4px;
    padding:8px;
    border:1px solid rgba(223,234,243,.92);
    border-radius:24px;
    background:rgba(255,255,255,.92);
    box-shadow:0 14px 34px rgba(15,38,59,.14);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    z-index:76;
  }
  .retainly-app-bottom-nav a{
    min-width:0;
    min-height:56px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    border-radius:18px;
    color:#6f7f92;
    font:800 11px/1.25 "Tajawal",system-ui,sans-serif;
    text-decoration:none;
  }
  .retainly-app-bottom-nav a svg{width:21px;height:21px;stroke-width:2;flex:0 0 auto}
  .retainly-app-bottom-nav a.is-active{background:#eaf7ff;color:var(--rt-app-primary)}
  .retainly-app-bottom-nav a:active{transform:scale(.98)}

  /* General responsive primitives */
  .card,.stat,.row,.side-card,.store-product-card,.store-cart-card,.store-orders-card,.store-order-detail-card{
    border-radius:var(--rt-app-radius-lg)!important;
    box-shadow:0 10px 24px rgba(15,38,59,.07)!important;
  }
  .btn,button.btn,a.btn,button[type="submit"]{min-height:48px!important;border-radius:14px!important;font-size:16px!important}
  input,select,textarea{min-height:48px!important;border-radius:14px!important;font-size:16px!important}
  .table{display:block!important;overflow-x:auto!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch!important}

  /* Home page app layout */
  body.home-page .retainly-home-header{margin:6px 0 18px!important;padding-inline-end:54px!important;display:block!important}
  body.home-page .retainly-home-greeting h1{font-size:28px!important;line-height:1.24!important;margin:0!important}
  body.home-page .retainly-home-greeting p{font-size:15px!important;line-height:1.6!important;margin-top:6px!important}
  .retainly-home-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;margin-bottom:14px!important}
  .retainly-home-summary-card{min-height:146px!important;padding:16px!important;border-radius:20px!important;gap:8px!important}
  .retainly-home-summary-icon{width:42px!important;height:42px!important}.retainly-home-summary-icon svg{width:22px!important;height:22px!important}
  .retainly-home-summary-card h3{font-size:14px!important;line-height:1.35!important}.retainly-home-summary-value{font-size:22px!important}.retainly-home-summary-card p{font-size:12px!important;line-height:1.45!important}.retainly-home-summary-link{font-size:12px!important}
  .home-page .retainly-notifications-card{border-radius:22px!important;overflow:hidden!important}
  .home-page .retainly-notifications-head{padding:18px!important}.home-page .retainly-notifications-head h2{font-size:20px!important}
  .home-page .retainly-notification-row{grid-template-columns:46px minmax(0,1fr)!important;gap:10px!important;min-height:auto!important;padding:16px!important;align-items:start!important}
  .home-page .retainly-notification-icon{width:42px!important;height:42px!important}
  .home-page .retainly-notification-copy strong{font-size:15px!important;line-height:1.5!important}.home-page .retainly-notification-copy p{font-size:12px!important;line-height:1.6!important}
  .home-page .retainly-notification-action{grid-column:1/-1!important;width:100%!important;min-height:46px!important;margin-top:4px!important}
  .home-page .retainly-notifications-all{padding:0 16px 16px!important}

  /* Store page app layout */
  .store-page .store-header{margin:4px 0 12px!important;padding-inline-end:54px!important}
  .store-page .store-title h1{font-size:29px!important;line-height:1.25!important}.store-page .store-title p{font-size:14px!important;line-height:1.6!important}
  .store-hero{grid-template-columns:1fr!important;gap:14px!important;min-height:0!important;padding:20px!important;border-radius:24px!important;text-align:start!important}
  .store-hero-media{order:-1!important;min-height:128px!important}.store-hero-media img{max-height:150px!important}.store-hero-fallback{width:150px!important;height:104px!important;border-radius:28px!important;font-size:44px!important}
  .store-hero h2{font-size:23px!important;margin:10px 0 6px!important}.store-hero p{font-size:13px!important;line-height:1.65!important}.store-hero-price{font-size:21px!important}.store-hero .btn{width:100%!important;min-width:0!important}
  .store-toolbar{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}.store-search{max-width:none!important;width:100%!important}.store-search input{height:48px!important}.store-filter-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.store-filter-actions button,.store-filter-actions select{width:100%!important;min-width:0!important;height:48px!important}
  .store-products-grid{grid-template-columns:1fr!important;gap:12px!important}.store-product-card{grid-template-columns:104px minmax(0,1fr)!important;min-height:150px!important;padding:12px!important;border-radius:20px!important}.store-product-media{height:126px!important;border-radius:16px!important}.store-product-media img{max-height:112px!important}.store-product-body{gap:6px!important;padding:0!important}.store-product-body h2{font-size:16px!important;line-height:1.35!important}.store-product-body p{font-size:12px!important;line-height:1.55!important;min-height:0!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}.store-product-price{font-size:17px!important}.store-card-actions .btn,.store-product-card .btn{min-height:42px!important;font-size:13px!important}
  .store-scan-info-strip{align-items:flex-start!important;text-align:start!important;justify-content:flex-start!important;margin-top:12px!important;border-radius:18px!important;padding:14px!important;font-size:13px!important;line-height:1.6!important}.store-scan-info-strip small{font-size:12px!important}
}

@media(max-width:390px){
  .retainly-home-summary-grid{grid-template-columns:1fr!important}
  .store-product-card{grid-template-columns:96px minmax(0,1fr)!important}
  .retainly-app-bottom-nav{inset-inline:6px;padding:6px;border-radius:20px}
  .retainly-app-bottom-nav a{font-size:10px;min-height:54px;border-radius:15px}
}

@media(min-width:821px){.retainly-app-bottom-nav{display:none!important}}

/* mobile-sidebar-toggle-remove-20260703ai */
.mobile-sidebar-toggle{display:none!important}
@media(max-width:820px){body:not(.login-body) .mobile-sidebar-toggle{display:none!important}body.home-page .retainly-home-header,.store-page .store-header{padding-inline-end:0!important}}
