.pulse-stories-strip { display: none !important; }

.shafx-stories-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 18px 4px 26px;
  margin: 18px 0 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shafx-stories-strip::-webkit-scrollbar { height: 0; display: none; }

.shafx-story-card {
  flex: 0 0 78px;
  width: 78px; height: 78px;
  scroll-snap-align: start;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  background: transparent;
  padding: 3px;
  transition: transform .15s ease;
}
.shafx-story-card:hover { transform: scale(1.06); }
.shafx-story-card:active { transform: scale(0.97); }
.shafx-story-card:focus { outline: 2px solid #ffcc00; outline-offset: 4px; }
.shafx-story-card:focus:not(:focus-visible) { outline: none; }

.shafx-story-card.unviewed {
  background: conic-gradient(from 180deg at 50% 50%,
    #ffcc00 0deg, #ff8800 90deg, #ec4899 180deg, #a855f7 270deg, #ffcc00 360deg);
  animation: shafx-ring-spin 8s linear infinite;
}
@keyframes shafx-ring-spin {
  to { background: conic-gradient(from 540deg at 50% 50%,
    #ffcc00 0deg, #ff8800 90deg, #ec4899 180deg, #a855f7 270deg, #ffcc00 360deg); }
}
.shafx-story-card.viewed { background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.06)); }
.shafx-story-card.viewed:hover { background: linear-gradient(135deg, rgba(255,255,255,.3), rgba(255,255,255,.12)); }

.shafx-story-card .inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: var(--surface-2, #2a2f54);
  border: 3px solid var(--bg, #0b0e1c);
  box-sizing: border-box;
}
.shafx-story-card .bg-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.shafx-story-card .avatar-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ffcc00, #ff8800);
  color: #191d34;
  font-size: 1.6rem; font-weight: 900;
}

.story-count-badge {
  position: absolute; top: -2px; right: -2px;
  background: #ffcc00; color: #191d34;
  font-size: .56rem; font-weight: 900;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg, #0b0e1c);
  z-index: 2;
}
html[dir="rtl"] .story-count-badge { right: auto; left: -2px; }

.shafx-story-card .author-label {
  position: absolute; bottom: -22px; left: 50%;
  transform: translateX(-50%);
  font-size: .68rem; color: var(--text-2, #b9c0e4);
  white-space: nowrap; max-width: 90px;
  overflow: hidden; text-overflow: ellipsis;
  font-weight: 600;
}
.shafx-story-card.unviewed .author-label { color: var(--text, #f4f6ff); font-weight: 700; }

.shafx-story-card.add {
  background: linear-gradient(135deg, rgba(255,204,0,.15), rgba(255,204,0,.05));
  border: 2px dashed rgba(255,204,0,.5);
  padding: 0;
}
.shafx-story-card.add .inner { background: transparent; border: none; display: flex; align-items: center; justify-content: center; }
.shafx-story-card.add .plus-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #ffcc00; color: #191d34;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 900; line-height: 1;
  box-shadow: 0 2px 8px rgba(255,204,0,.4);
}
.shafx-story-card.add:hover .plus-icon { transform: scale(1.1); }
.shafx-story-card.add .author-label { color: #ffcc00; font-weight: 700; }

dialog.shafx-story-create {
  background: var(--surface, #1a1f44);
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 16px;
  padding: 0; max-width: 480px; width: 92vw;
  color: var(--text, #f4f6ff);
}
dialog.shafx-story-create::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.shafx-story-create form { padding: 24px; }
.shafx-story-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; background: rgba(0,0,0,.2); border-radius: 10px; padding: 4px; }
.shafx-story-tab { padding: 10px; background: transparent; color: var(--text-2, #b9c0e4); border: 0; border-radius: 7px; cursor: pointer; font-weight: 700; font-size: .9rem; }
.shafx-story-tab.active { background: #ffcc00; color: #191d34; }
.shafx-story-bg-picker { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.shafx-story-bg { width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: transform .15s; }
.shafx-story-bg:hover { transform: scale(1.1); }
.shafx-story-bg.selected { border-color: #ffcc00; box-shadow: 0 0 0 2px var(--bg, #0b0e1c); }
.shafx-img-preview { margin-top: 12px; border-radius: 10px; overflow: hidden; max-height: 280px; display: none; border: 1px solid var(--line); }
.shafx-img-preview.show { display: block; }
.shafx-img-preview img { width: 100%; height: auto; display: block; }
.shafx-img-info { margin-top: 6px; font-size: .76rem; color: #22c55e; display: none; font-weight: 600; }
.shafx-img-info.show { display: block; }

dialog.shafx-story-viewer { background: transparent; border: 0; padding: 0; max-width: 480px; width: 95vw; max-height: 95vh; }
dialog.shafx-story-viewer::backdrop { background: rgba(0,0,0,.96); backdrop-filter: blur(8px); }
.shafx-story-view-card { width: 100%; aspect-ratio: 9/16; border-radius: 18px; overflow: hidden; position: relative; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.shafx-story-progress { position: absolute; top: 12px; left: 12px; right: 12px; height: 3px; display: flex; gap: 4px; z-index: 10; }
.shafx-story-progress span { flex: 1; background: rgba(255,255,255,.3); border-radius: 99px; overflow: hidden; }
.shafx-story-progress span.done { background: rgba(255,255,255,.95); }
.shafx-story-progress span.active::after { content: ''; display: block; height: 100%; background: #fff; width: 0; animation: storyFill 6s linear forwards; }
@keyframes storyFill { to { width: 100%; } }
.shafx-story-close { position: absolute; top: 28px; right: 14px; background: rgba(0,0,0,.5); border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; z-index: 11; width: 36px; height: 36px; border-radius: 50%; line-height: 1; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.shafx-story-close:hover { background: rgba(0,0,0,.8); }
html[dir="rtl"] .shafx-story-close { right: auto; left: 14px; }
.shafx-story-view-body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 28px; font-size: 1.4rem; font-weight: 700; color: #fff; text-align: center; line-height: 1.4; word-break: break-word; }
.shafx-story-view-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shafx-story-view-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; padding: 28px 20px 24px; font-size: .95rem; line-height: 1.4; }
.shafx-story-view-author { position: absolute; top: 30px; left: 18px; display: flex; align-items: center; gap: 10px; color: #fff; font-size: .88rem; font-weight: 700; z-index: 11; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
html[dir="rtl"] .shafx-story-view-author { left: auto; right: 18px; }
.shafx-story-view-author .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffcc00, #ff8800);
  color: #191d34;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem;
  border: 2px solid rgba(255,255,255,.4);
  overflow: hidden;
}
.shafx-story-view-author .av img { width: 100%; height: 100%; object-fit: cover; }

.shafx-story-views-pill { position: absolute; bottom: 14px; left: 18px; display: inline-flex; align-items: center; gap: 5px; background: rgba(0,0,0,.55); color: #fff; font-size: .76rem; font-weight: 700; padding: 6px 11px; border-radius: 99px; backdrop-filter: blur(4px); z-index: 11; }
html[dir="rtl"] .shafx-story-views-pill { left: auto; right: 18px; }

.shafx-story-meta-pill { display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.5); color: #fff; font-size: .68rem; font-weight: 700; padding: 4px 9px; border-radius: 99px; margin-right: 4px; letter-spacing: .02em; backdrop-filter: blur(4px); }
.shafx-story-meta-pill.long { background: rgba(34,197,94,.7); }
.shafx-story-meta-pill.short { background: rgba(239,68,68,.7); }
.shafx-story-meta-pill.watch { background: rgba(245,158,11,.7); }

.shafx-story-tap-zones { position: absolute; inset: 0; display: flex; z-index: 5; }
.shafx-story-tap-zones .tap-left, .shafx-story-tap-zones .tap-right { flex: 1; cursor: pointer; }
.shafx-story-tap-zones .tap-left { flex: 0 0 30%; }

.brand-mark img.brand-logo {
  width: 28px; height: 28px;
  display: inline-block;
  vertical-align: middle;
}
.brand-mark .brand-mark-dot { display: none !important; }
.brand-mark { display: inline-flex; align-items: center; gap: 8px; }

.feed-act.feed-bookmark {
  background: transparent;
  border: 1px solid var(--line, rgba(255,255,255,.08));
  color: var(--text-2, #b9c0e4);
  font-size: 1.05rem; line-height: 1;
  padding: 6px 10px; border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.feed-act.feed-bookmark:hover {
  color: #ffcc00;
  border-color: rgba(255,204,0,.4);
  background: rgba(255,204,0,.06);
}
.feed-act.feed-bookmark.active {
  color: #ffcc00;
  border-color: rgba(255,204,0,.5);
  background: rgba(255,204,0,.1);
}

/* v1035 dashboard drawer + market news containment hotfix
   Surgical only: no redesign, only fixes broken mobile drawer stacking and widget overflow. */
@media (max-width: 960px) {
  html body.side-open,
  html.side-open body {
    overflow: hidden !important;
  }

  .app-shell {
    display: block !important;
    position: relative !important;
    overflow-x: hidden !important;
  }

  .app-side[data-app-side],
  aside.app-side[data-app-side] {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    inset-block-start: 0 !important;
    inset-block-end: 0 !important;
    width: 286px !important;
    max-width: 86vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    background: var(--bg-2, #11162b) !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2147483001 !important;
    pointer-events: auto !important;
    overflow-y: auto !important;
    transform: translateX(-110%) !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html[dir="ltr"] .app-side[data-app-side],
  html:not([dir="rtl"]) .app-side[data-app-side] {
    left: 0 !important;
    right: auto !important;
    border-right: 1px solid var(--line, rgba(255,255,255,.1)) !important;
    border-left: 0 !important;
    box-shadow: 14px 0 34px rgba(0,0,0,.45) !important;
  }

  html[dir="rtl"] .app-side[data-app-side] {
    right: 0 !important;
    left: auto !important;
    border-left: 1px solid var(--line, rgba(255,255,255,.1)) !important;
    border-right: 0 !important;
    box-shadow: -14px 0 34px rgba(0,0,0,.45) !important;
    transform: translateX(110%) !important;
  }

  body.side-open .app-side[data-app-side],
  body.side-open .app-side[data-app-side].open,
  .app-side[data-app-side].open {
    transform: translateX(0) !important;
  }

  body.side-open::before {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    background: rgba(0,0,0,.48) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: auto !important;
  }

  .menu-toggle-app,
  [data-app-toggle] {
    position: relative !important;
    z-index: 2147483002 !important;
  }

  .app-topbar { z-index: 2147482000 !important; }
}

.shafx-native-calendar-note { position: relative; z-index: 1; }
#economicCalendarWidget,
#mql5_widget,
#mql5_widget iframe {
  max-width: 100% !important;
}

/* v1036 final mobile drawer correction — matches JS body.nav-open + body.side-open and prevents blur-only state */
@media (max-width:960px){
  body.nav-open, body.side-open, html.side-open body{overflow:hidden!important;}
  .shafx-mobile-scrim{position:fixed!important;inset:0!important;background:rgba(0,0,0,.50)!important;z-index:2147483000!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transition:opacity .15s ease,visibility .15s ease!important;}
  .shafx-mobile-scrim.show, body.nav-open .shafx-mobile-scrim, body.side-open .shafx-mobile-scrim{opacity:1!important;visibility:visible!important;pointer-events:auto!important;}
  .app-side[data-app-side], aside.app-side[data-app-side], .app-side{display:flex!important;position:fixed!important;top:0!important;bottom:0!important;inset-block-start:0!important;inset-block-end:0!important;width:286px!important;max-width:86vw!important;height:100dvh!important;max-height:100dvh!important;background:var(--bg-2,#11162b)!important;opacity:1!important;visibility:visible!important;z-index:2147483002!important;pointer-events:auto!important;overflow-y:auto!important;filter:none!important;-webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  html:not([dir="rtl"]) .app-side, html[dir="ltr"] .app-side{left:0!important;right:auto!important;transform:translateX(-110%)!important;box-shadow:14px 0 34px rgba(0,0,0,.45)!important;}
  html[dir="rtl"] .app-side{right:0!important;left:auto!important;transform:translateX(110%)!important;box-shadow:-14px 0 34px rgba(0,0,0,.45)!important;}
  body.nav-open .app-side, body.side-open .app-side, .app-side.open, .app-side.is-open{transform:translateX(0)!important;}
  body.nav-open::before, body.side-open::before{content:none!important;display:none!important;}
  .menu-toggle-app,[data-app-toggle]{position:relative!important;z-index:2147483003!important;}
}

/* v1036 brand/poster image safety */
.brand-mark img,.brand-logo{object-fit:contain!important;background:transparent!important;}
.admin-creative-preview{width:70px;max-height:45px;object-fit:cover;border-radius:6px;background:rgba(0,0,0,.15);}
html[dir="rtl"] .row-reverse-rtl{direction:rtl;}
html[dir="rtl"] .app-form input,html[dir="rtl"] .app-form textarea,html[dir="rtl"] .app-form select{text-align:start;}

/* v1036 prevent old cached external market widgets from escaping the dashboard */
iframe[src*="tradays"],iframe[src*="mql5.com"],iframe[src*="economic-calendar"],.tradays-widget,.economicCalendarWidget,#economicCalendarWidget,#mql5_widget{display:none!important;max-height:0!important;overflow:hidden!important;}


/* v1037 drawer close button — functional only, keeps existing sidebar design */
.shafx-drawer-close{display:none!important;}
@media (max-width:960px){
  .app-side .shafx-drawer-close{display:flex!important;position:sticky!important;top:8px!important;align-self:flex-end!important;margin:8px 10px 4px auto!important;width:36px!important;height:36px!important;border-radius:10px!important;border:1px solid var(--line,rgba(255,255,255,.12))!important;background:rgba(255,255,255,.06)!important;color:var(--text,#fff)!important;align-items:center!important;justify-content:center!important;font-size:28px!important;line-height:1!important;font-weight:500!important;z-index:2147483004!important;cursor:pointer!important;}
  html[dir="rtl"] .app-side .shafx-drawer-close{margin-left:10px!important;margin-right:auto!important;}
  .app-side .shafx-drawer-close:hover{background:rgba(255,204,0,.12)!important;color:#ffcc00!important;border-color:rgba(255,204,0,.35)!important;}
}


/* v1039 drawer anti double-toggle / final open-state hardening */
@media (max-width:960px){
  body.nav-open .app-side[data-app-side], body.side-open .app-side[data-app-side], .app-side[data-app-side].open, .app-side[data-app-side].is-open{transform:translateX(0)!important;visibility:visible!important;opacity:1!important;display:flex!important;}
  .menu-toggle-app[data-app-toggle]{touch-action:manipulation!important;pointer-events:auto!important;}
}


/* v1040 remaining RTL + responsive hardening — no redesign, logical-direction fixes only */
html[dir="rtl"] body{font-family:"Noto Kufi Arabic","Inter",system-ui,sans-serif;}
html[dir="rtl"] .app-topbar,html[dir="rtl"] .topbar,html[dir="rtl"] .feed-head,html[dir="rtl"] .feed-head-actions,html[dir="rtl"] .feed-engage,html[dir="rtl"] .feed-tabs,html[dir="rtl"] .feed-actions,html[dir="rtl"] .feed-side-head{direction:rtl;text-align:start;}
html[dir="rtl"] .app-nav a,html[dir="rtl"] .admin-nav a,html[dir="rtl"] .feed-action-btn,html[dir="rtl"] .feed-side a{direction:rtl;text-align:start;}
html[dir="rtl"] input,html[dir="rtl"] textarea,html[dir="rtl"] select{direction:rtl;text-align:start;}
html[dir="rtl"] input[type="email"],html[dir="rtl"] input[type="url"],html[dir="rtl"] input[type="number"],html[dir="rtl"] input[name*="email"],html[dir="rtl"] input[name*="url"],html[dir="rtl"] input[name*="link"]{direction:ltr;text-align:left;}
html[dir="rtl"] table{direction:rtl;}
html[dir="rtl"] th,html[dir="rtl"] td{text-align:start;}
html[dir="rtl"] .feed-card,html[dir="rtl"] .feed-post,html[dir="rtl"] .feed-composer,html[dir="rtl"] .feed-side-card,html[dir="rtl"] .app-card,html[dir="rtl"] .admin-card{text-align:start;}
html[dir="rtl"] .feed-post[style*="border-left"],html[dir="rtl"] .feed-card[style*="border-left"]{border-left-width:1px!important;border-right:3px solid var(--brand)!important;}
html[dir="rtl"] .feed-side{direction:rtl;}
html[dir="rtl"] .feed-side-room-meta,html[dir="rtl"] .feed-side-news small{direction:ltr;unicode-bidi:plaintext;}
@media(max-width:960px){
  .app-main,.app-content{min-width:0!important;max-width:100vw!important;overflow-x:hidden!important;}
  .feed-head,.feed-head-actions,.feed-engage,.feed-layout{max-width:100%!important;}
  .feed-head-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
  .feed-action-btn{min-width:0!important;}
  .app-side[data-app-side]{will-change:transform!important;}
}
/* v1040 keep native market-news area contained even when provider scripts/extensions inject nodes */
.market-news-page,.market-news-shell,.mn-page,.mn-shell{position:relative!important;overflow:hidden!important;max-width:100%!important;}
.market-news-page iframe,.market-news-shell iframe,.mn-page iframe,.mn-shell iframe{max-width:100%!important;}
body>iframe[src*="tradays"],body>iframe[src*="mql5"],body>.tradays-widget,body>#economicCalendarWidget,body>#mql5_widget{display:none!important;}


/* v1041 admin/table RTL + translation utility hardening — no redesign */
html[dir="rtl"] .app-content,
html[dir="rtl"] .panel,
html[dir="rtl"] .panel-body,
html[dir="rtl"] .card,
html[dir="rtl"] .stat-card,
html[dir="rtl"] .table-wrap,
html[dir="rtl"] .toolbar{direction:rtl;text-align:start;}
html[dir="rtl"] table,
html[dir="rtl"] .tbl,
html[dir="rtl"] .cron-tbl{direction:rtl;}
html[dir="rtl"] th,
html[dir="rtl"] td{text-align:start;}
html[dir="rtl"] input:not([type="email"]):not([type="url"]):not([type="number"]):not([type="tel"]),
html[dir="rtl"] textarea,
html[dir="rtl"] select{direction:rtl;text-align:start;}
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] code,
html[dir="rtl"] pre,
html[dir="rtl"] .mono,
html[dir="rtl"] .symbol{direction:ltr;text-align:left;unicode-bidi:isolate;}
html[dir="rtl"] .top-actions{flex-direction:row-reverse;}
html[dir="rtl"] .topbar-bell-wrap #topbar-bell-dropdown{right:auto!important;left:0!important;text-align:start;}
html[dir="rtl"] .app-nav a{flex-direction:row-reverse;justify-content:flex-start;text-align:start;}
html[dir="rtl"] .app-nav svg{margin-inline-start:0;margin-inline-end:0;}
html[dir="rtl"] .footer{direction:rtl;text-align:start;}
html[dir="rtl"] .footer a{display:block;text-align:start;}
html[dir="rtl"] .group-label{text-align:start;}
@media(max-width:720px){
  html[dir="rtl"] .toolbar,
  html[dir="rtl"] .filters,
  html[dir="rtl"] .top-actions{gap:8px;}
  html[dir="rtl"] .app-content{overflow-x:hidden;}
  html[dir="rtl"] table{min-width:640px;}
  html[dir="rtl"] .table-wrap,
  html[dir="rtl"] .panel-body{overflow-x:auto;}
}


/* v1042 page-level RTL/content admin hardening — surgical only */
html[dir="rtl"] .toolbar,
html[dir="rtl"] .filters,
html[dir="rtl"] .app-form .row,
html[dir="rtl"] .panel-head,
html[dir="rtl"] .kpi-grid,
html[dir="rtl"] .cron-tools { direction: rtl; }
html[dir="rtl"] .toolbar .btn,
html[dir="rtl"] .toolbar .btn-sm { margin-left: 0 !important; }
html[dir="rtl"] .shafx-lang-tabs { direction: ltr; justify-content: flex-end; }
html[dir="rtl"] .tbl th,
html[dir="rtl"] .tbl td { text-align: start !important; }
html[dir="rtl"] .tbl td:last-child { text-align: end !important; }
html[dir="rtl"] .status-badge { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .muted { text-align: inherit; }
html[dir="rtl"] textarea[name="body"],
html[dir="rtl"] textarea[name="faq_json"] { direction: ltr; text-align: left; }
html[dir="rtl"] select[name="lang"],
html[dir="rtl"] select[name="language"] { direction: ltr; }
@media (max-width: 780px){
  .tbl { min-width: 720px; }
  .panel-body { overflow-x: auto; }
  html[dir="rtl"] .panel-body { direction: rtl; }
}


/* v1043 admin operations RTL + stability hardening — surgical only */
html[dir="rtl"] .toolbar,
html[dir="rtl"] .filters,
html[dir="rtl"] .admin-publisher-tabs,
html[dir="rtl"] .cron-tools,
html[dir="rtl"] .cron-doc-grid,
html[dir="rtl"] .cron-summary {
  direction: rtl;
  text-align: start;
}
html[dir="rtl"] .admin-publisher-tabs a,
html[dir="rtl"] .toolbar .btn,
html[dir="rtl"] .cron-tools .btn-tool {
  text-align: center;
}
html[dir="rtl"] .panel .tbl th,
html[dir="rtl"] .panel .tbl td,
html[dir="rtl"] .cron-tbl th,
html[dir="rtl"] .cron-tbl td {
  text-align: start;
}
html[dir="rtl"] .panel .tbl th:last-child,
html[dir="rtl"] .panel .tbl td:last-child,
html[dir="rtl"] .cron-tbl th:last-child,
html[dir="rtl"] .cron-tbl td:last-child {
  text-align: start !important;
}
html[dir="rtl"] .admin-table-scroll,
html[dir="rtl"] .cron-section {
  direction: rtl;
}
html[dir="rtl"] .admin-table-scroll table,
html[dir="rtl"] .cron-section table {
  direction: rtl;
}
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[name*="email"],
html[dir="rtl"] input[name*="url"],
html[dir="rtl"] input[name*="account"],
html[dir="rtl"] input[name*="tx"],
html[dir="rtl"] .cron-cpanel-box,
html[dir="rtl"] .cron-export-box,
html[dir="rtl"] code,
html[dir="rtl"] .cron-name,
html[dir="rtl"] .amt {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: start;
}
html[dir="rtl"] details summary {
  text-align: start;
}
.admin-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.admin-table-scroll > table,
.cron-section table {
  min-width: 760px;
}
.cron-master-card {
  border-color: rgba(255,204,0,.28) !important;
  background: rgba(255,204,0,.045) !important;
}
@media (max-width: 780px) {
  .admin-publisher-tabs,
  .cron-tools,
  .toolbar .filters {
    gap: 8px !important;
  }
  .admin-publisher-tabs a,
  .cron-tools .btn-tool,
  .toolbar .filters select,
  .toolbar .filters input {
    width: 100%;
  }
  .panel .tbl td,
  .panel .tbl th,
  .cron-tbl td,
  .cron-tbl th {
    white-space: nowrap;
  }
}

/* v1044 native market calendar + translation admin hardening */
.shafx-native-calendar{position:relative;z-index:1;max-width:100%;overflow:hidden}
.shafx-calendar-grid{scrollbar-width:thin;direction:ltr}
html[dir="rtl"] .shafx-calendar-grid{direction:rtl}
.shafx-calendar-day{box-sizing:border-box;overflow:hidden}
.shafx-calendar-day a{transition:background .15s ease,border-color .15s ease}
.shafx-calendar-day a:hover{background:rgba(255,204,0,.08)!important}
html[dir="rtl"] .shafx-calendar-day{text-align:right}
html[dir="rtl"] .shafx-calendar-day a{border-left:0!important}
@media(max-width:900px){.shafx-calendar-grid{grid-template-columns:repeat(7,155px)!important;overflow-x:auto;-webkit-overflow-scrolling:touch}.shafx-native-calendar{margin-inline:-2px}}
.admin-translations-tools,.translations-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
html[dir="rtl"] .admin-translations-tools,html[dir="rtl"] .translations-tools{direction:rtl;text-align:right}
html[dir="rtl"] code,html[dir="rtl"] .number,html[dir="rtl"] [class*="monospace"]{direction:ltr;unicode-bidi:embed}


/* v1045 PWA install prompt: avoid overlapping mobile bottom navigation */
.shafx-pwa-install-btn[data-pwa-install]{
  white-space:nowrap;
  max-width:calc(100vw - 24px);
}
.shafx-pwa-install-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:rgba(17,22,43,.16);
  font-size:16px;
  font-weight:900;
  line-height:1;
  margin-inline-start:2px;
}
@media(max-width:960px){
  .shafx-pwa-install-btn[data-pwa-install]{
    bottom:calc(78px + env(safe-area-inset-bottom, 0px))!important;
    inset-inline-end:12px!important;
    padding:8px 11px!important;
    font-size:.82rem!important;
    z-index:2147482500!important;
  }
  body.pwa-install-visible .app-content{padding-bottom:38px!important;}
}
@media(max-width:420px){
  .shafx-pwa-install-btn[data-pwa-install]{
    bottom:calc(82px + env(safe-area-inset-bottom, 0px))!important;
    inset-inline-end:10px!important;
  }
}

/* v1048 final mobile drawer + story/RTL stability hotfix */
@media (max-width:960px){
  html body.side-open, html body.nav-open, html.side-open body{overflow:hidden!important;touch-action:none!important;}
  .app-side[data-app-side], aside.app-side[data-app-side], .app-side{
    position:fixed!important;top:0!important;bottom:0!important;inset-block:0!important;
    width:min(86vw,320px)!important;max-width:86vw!important;height:100dvh!important;max-height:100dvh!important;
    display:flex!important;flex-direction:column!important;opacity:1!important;visibility:visible!important;
    background:var(--bg-2,#11162b)!important;z-index:2147483646!important;pointer-events:auto!important;
    overflow-y:auto!important;overflow-x:hidden!important;filter:none!important;-webkit-filter:none!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;will-change:transform!important;
  }
  html:not([dir="rtl"]) .app-side[data-app-side], html[dir="ltr"] .app-side[data-app-side]{left:0!important;right:auto!important;transform:translate3d(-112%,0,0)!important;box-shadow:18px 0 50px rgba(0,0,0,.5)!important;}
  html[dir="rtl"] .app-side[data-app-side]{right:0!important;left:auto!important;transform:translate3d(112%,0,0)!important;box-shadow:-18px 0 50px rgba(0,0,0,.5)!important;}
  body.side-open .app-side[data-app-side], body.nav-open .app-side[data-app-side], .app-side[data-app-side].open, .app-side[data-app-side].is-open{transform:translate3d(0,0,0)!important;}
  .app-side[data-app-side] *, .app-side.open *, .app-side.is-open *{pointer-events:auto!important;}
  .shafx-mobile-scrim{position:fixed!important;inset:0!important;z-index:2147483640!important;background:rgba(0,0,0,.48)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  body.side-open .shafx-mobile-scrim, body.nav-open .shafx-mobile-scrim, .shafx-mobile-scrim.show{opacity:1!important;visibility:visible!important;pointer-events:auto!important;}
  body.side-open::before, body.nav-open::before{content:none!important;display:none!important;pointer-events:none!important;}
  [data-app-toggle], .menu-toggle-app{position:relative!important;z-index:2147483647!important;pointer-events:auto!important;touch-action:manipulation!important;}
  .app-side .shafx-drawer-close{display:flex!important;position:sticky!important;top:8px!important;z-index:2147483647!important;pointer-events:auto!important;}
  .app-main,.app-content,.feed-page,.feed-shell{filter:none!important;-webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
}

@media(max-width:960px){
  .shafx-pwa-install-btn[data-pwa-install]{bottom:calc(82px + env(safe-area-inset-bottom,0px))!important;right:12px!important;z-index:850!important;max-width:calc(100vw - 24px)!important;}
  html[dir="rtl"] .shafx-pwa-install-btn[data-pwa-install]{right:auto!important;left:12px!important;}
  .app-bottom-nav{z-index:900!important;}
}

html[dir="rtl"] dialog, html[dir="rtl"] .modal, html[dir="rtl"] .feed-composer, html[dir="rtl"] .feed-card, html[dir="rtl"] .feed-item, html[dir="rtl"] .app-card, html[dir="rtl"] .admin-card{direction:rtl;text-align:start;}
html[dir="rtl"] .feed-grid, html[dir="rtl"] .dash-grid, html[dir="rtl"] .admin-grid{direction:rtl;}
html[dir="rtl"] .shafx-story-view-card, html[dir="rtl"] .shafx-story-view-body, html[dir="rtl"] .shafx-story-view-caption{direction:rtl;text-align:start;}
html[dir="rtl"] .shafx-story-progress, html[dir="rtl"] .shafx-story-tap-zones{direction:ltr;}


/* v1048 emergency: drawer clickability + PWA/feed story stability */
@media (max-width:960px){
  .shafx-mobile-scrim{z-index:2147483000!important;pointer-events:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  .app-side[data-app-side], .app-side{z-index:2147483600!important;pointer-events:auto!important;visibility:visible!important;opacity:1!important;filter:none!important;-webkit-filter:none!important;}
  .app-side[data-app-side] *, .app-side *{pointer-events:auto!important;}
  body.side-open .app-side[data-app-side], body.nav-open .app-side[data-app-side], .app-side.open, .app-side.is-open{transform:translate3d(0,0,0)!important;display:flex!important;}
  [data-app-toggle], .menu-toggle-app{z-index:2147483647!important;pointer-events:auto!important;}
  .app-main,.app-content,.feed-page,.feed-shell{filter:none!important;-webkit-filter:none!important;}
  .shafx-pwa-install-btn[data-pwa-install]{bottom:calc(88px + env(safe-area-inset-bottom,0px))!important;}
}


/* v1049 drawer final: clickable side, non-blocking scrim, stable mobile RTL/LTR */
@media(max-width:960px){
  html.side-open, body.side-open, body.nav-open{overflow:hidden!important;}
  .app-side[data-app-side], aside.app-side, .app-side{
    position:fixed!important;top:0!important;bottom:0!important;height:100dvh!important;width:min(82vw,304px)!important;max-width:82vw!important;
    z-index:2147483647!important;background:#0d1024!important;opacity:1!important;visibility:visible!important;display:flex!important;flex-direction:column!important;
    pointer-events:auto!important;overflow-y:auto!important;overflow-x:hidden!important;filter:none!important;-webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  html:not([dir="rtl"]) .app-side[data-app-side], html[dir="ltr"] .app-side[data-app-side], html:not([dir="rtl"]) aside.app-side, html[dir="ltr"] aside.app-side{left:0!important;right:auto!important;transform:translate3d(-110%,0,0)!important;box-shadow:18px 0 55px rgba(0,0,0,.52)!important;}
  html[dir="rtl"] .app-side[data-app-side], html[dir="rtl"] aside.app-side{right:0!important;left:auto!important;transform:translate3d(110%,0,0)!important;box-shadow:-18px 0 55px rgba(0,0,0,.52)!important;}
  body.side-open .app-side[data-app-side], body.nav-open .app-side[data-app-side], .app-side.open, .app-side.is-open{transform:translate3d(0,0,0)!important;}
  .app-side[data-app-side] *, .app-side *{pointer-events:auto!important;}
  .shafx-mobile-scrim{position:fixed!important;inset:0!important;z-index:2147483000!important;background:rgba(0,0,0,.34)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  body.side-open .shafx-mobile-scrim, body.nav-open .shafx-mobile-scrim, .shafx-mobile-scrim.show{opacity:1!important;visibility:visible!important;pointer-events:none!important;}
  [data-app-toggle], .menu-toggle-app{position:relative!important;z-index:2147483647!important;pointer-events:auto!important;touch-action:manipulation!important;}
  .app-side .shafx-drawer-close{display:flex!important;align-items:center!important;justify-content:center!important;position:sticky!important;top:8px!important;align-self:flex-end!important;width:34px!important;height:34px!important;margin:8px 10px 0!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:10px!important;background:rgba(255,255,255,.08)!important;color:#fff!important;font-size:24px!important;line-height:1!important;z-index:2147483647!important;pointer-events:auto!important;}
  html[dir="rtl"] .app-side .shafx-drawer-close{align-self:flex-start!important;}
  .app-main,.app-content,.feed-page,.feed-shell{filter:none!important;-webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  body.side-open::before, body.nav-open::before{display:none!important;content:none!important;}
}


/* v1050 publish-day drawer + PWA + story modal stability */
@media (max-width: 991px){
  html.side-open, body.side-open, body.nav-open{overflow:hidden!important;}
  .app-shell:before, .drawer-backdrop, .shafx-drawer-backdrop{
    content:"";position:fixed!important;inset:0!important;background:rgba(0,0,0,.48)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;z-index:900!important;opacity:0;visibility:hidden;pointer-events:none;
  }
  body.side-open .app-shell:before, body.nav-open .app-shell:before,
  body.side-open .drawer-backdrop, body.nav-open .drawer-backdrop,
  body.side-open .shafx-drawer-backdrop, body.nav-open .shafx-drawer-backdrop{opacity:1!important;visibility:visible!important;pointer-events:auto!important;}
  .app-sidebar,.dashboard-sidebar,aside.app-sidebar{
    position:fixed!important;top:0!important;bottom:0!important;left:0!important;right:auto!important;
    width:min(82vw,320px)!important;max-width:320px!important;transform:translateX(-110%)!important;
    z-index:1500!important;opacity:1!important;visibility:visible!important;filter:none!important;backdrop-filter:none!important;
    pointer-events:auto!important;overflow-y:auto!important;background:#090d1d!important;box-shadow:24px 0 80px rgba(0,0,0,.55)!important;
  }
  html[dir="rtl"] .app-sidebar, html[dir="rtl"] .dashboard-sidebar, html[dir="rtl"] aside.app-sidebar,
  body[dir="rtl"] .app-sidebar, body[dir="rtl"] .dashboard-sidebar, body[dir="rtl"] aside.app-sidebar{
    right:0!important;left:auto!important;transform:translateX(110%)!important;box-shadow:-24px 0 80px rgba(0,0,0,.55)!important;
  }
  body.side-open .app-sidebar, body.nav-open .app-sidebar, body.side-open .dashboard-sidebar, body.nav-open .dashboard-sidebar,
  body.side-open aside.app-sidebar, body.nav-open aside.app-sidebar{transform:translateX(0)!important;}
  .app-sidebar *, .dashboard-sidebar *, aside.app-sidebar *{pointer-events:auto!important;}
  .menu-toggle-app,[data-app-toggle],[data-menu-toggle],.sidebar-close,.shafx-sidebar-close{position:relative!important;z-index:1700!important;pointer-events:auto!important;}
  .pwa-install-banner,.pwa-install,.shafx-pwa-install{bottom:calc(86px + env(safe-area-inset-bottom,0px))!important;z-index:850!important;}
  .bottom-nav,.mobile-bottom-nav{z-index:820!important;}
}
.shafx-story-viewer,.shafx-story-viewer-dlg,dialog#shafx-story-viewer-dlg{z-index:2200!important;}
html[dir="rtl"] .shafx-story-progress{direction:rtl;}

/* v1050 final selector correction: real dashboard sidebar class is .app-side */
@media (max-width: 991px){
  .app-side,[data-app-side]{
    position:fixed!important;top:0!important;bottom:0!important;left:0!important;right:auto!important;
    width:min(82vw,320px)!important;max-width:320px!important;transform:translateX(-110%)!important;
    z-index:1500!important;opacity:1!important;visibility:visible!important;filter:none!important;backdrop-filter:none!important;
    pointer-events:auto!important;overflow-y:auto!important;background:#090d1d!important;box-shadow:24px 0 80px rgba(0,0,0,.55)!important;
  }
  html[dir="rtl"] .app-side, html[dir="rtl"] [data-app-side], body[dir="rtl"] .app-side, body[dir="rtl"] [data-app-side]{
    right:0!important;left:auto!important;transform:translateX(110%)!important;box-shadow:-24px 0 80px rgba(0,0,0,.55)!important;
  }
  body.side-open .app-side, body.nav-open .app-side, body.side-open [data-app-side], body.nav-open [data-app-side]{
    transform:translateX(0)!important;opacity:1!important;visibility:visible!important;filter:none!important;pointer-events:auto!important;
  }
  .app-side *,[data-app-side] *{pointer-events:auto!important;filter:none!important;opacity:1;}
  .shafx-mobile-scrim{position:fixed!important;inset:0!important;background:rgba(0,0,0,.44)!important;z-index:900!important;opacity:0;visibility:hidden;pointer-events:none;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
  .shafx-mobile-scrim.show{opacity:1!important;visibility:visible!important;pointer-events:auto!important;}
  .shafx-drawer-close{display:flex!important;position:sticky!important;top:8px!important;margin:8px 8px 6px auto!important;width:36px!important;height:36px!important;align-items:center!important;justify-content:center!important;border-radius:12px!important;border:1px solid rgba(255,255,255,.14)!important;background:rgba(255,255,255,.06)!important;color:#fff!important;font-size:24px!important;line-height:1!important;z-index:1700!important;}
  html[dir="rtl"] .shafx-drawer-close{margin:8px auto 6px 8px!important;}
}
