/* =========================================================================
   Caden — product demo (app shell)
   Reuses the design tokens from styles.css. Three views: Home, Inbox, Calendar.
   ========================================================================= */

body.app-body {
  overflow-x: hidden;
}

.app {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* ------------------------------ Sidebar --------------------------------- */
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 20px 22px;
  border-inline-end: 1px solid var(--hairline);
  background: rgba(255, 250, 244, 0.55);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.app-sidebar .brand {
  font-size: 1.55rem;
  padding: 4px 8px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.side-nav a svg {
  width: 20px;
  height: 20px;
  flex: none;
  opacity: 0.8;
}

.side-nav a:hover {
  background: rgba(217, 88, 63, 0.06);
  color: var(--terracotta);
}

.side-nav a.active {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.side-nav a.active svg {
  opacity: 1;
}

.side-nav a .count {
  margin-inline-start: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--terracotta);
}

.side-spacer {
  flex: 1;
}

.quick-add {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.quick-add:hover {
  border-color: var(--hairline-strong);
  background: #fff;
}

.quick-add .plus {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.focus-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.focus-card .fc-body {
  padding: 16px 16px 12px;
}

.focus-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

.focus-card .fc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 2px;
}

.focus-card strong {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
}

.focus-card .play {
  margin-inline-start: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--terracotta-soft);
  color: var(--terracotta);
  display: grid;
  place-items: center;
  transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease);
}

.focus-card .play:hover {
  transform: scale(1.08);
  background: var(--terracotta);
  color: #fff;
}

.hills {
  height: 92px;
  background:
    radial-gradient(circle at 72% 30%, #b8623f 0 22%, transparent 23%),
    radial-gradient(circle at 22% 120%, #7f8f6a 0 55%, transparent 56%),
    radial-gradient(circle at 62% 120%, #54663f 0 48%, transparent 49%),
    linear-gradient(#f3e7d9, #efe2d2);
}

/* ------------------------------- Main ----------------------------------- */
.app-main {
  padding: 22px 30px 60px;
  min-width: 0;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.app-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  font-size: 0.9rem;
}

.app-search svg { width: 17px; height: 17px; opacity: 0.6; }
.app-search .kbd {
  margin-inline-start: auto;
  font-size: 0.74rem;
  color: var(--muted-2);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 2px 7px;
  background: #fff;
}

.app-topbar .spacer { flex: 1; }

.weather {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.weather .sun { color: var(--gold); }
.weather small { color: var(--muted); }
.weather b { font-weight: 600; }

.av-user {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--navy-2), var(--navy));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.5);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.back-link:hover { color: var(--terracotta); border-color: var(--terracotta); }

/* ------------------------------ Pages ----------------------------------- */
.view { display: none; animation: fadeUp 0.45s var(--ease); }
.view.active { display: block; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 22px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
}

.page-head .sub {
  color: var(--muted);
  font-size: 1.02rem;
  margin-top: 6px;
}

.head-actions { display: flex; gap: 10px; align-items: center; }

/* ------------------------------- Cards ---------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  backdrop-filter: blur(14px);
}

.card.dark {
  background: linear-gradient(155deg, #08213f, #0b2a4f);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.card.dark::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(26rem 16rem at 88% -10%, rgba(217,88,63,.34), transparent 60%);
  pointer-events: none;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-title h3 {
  font-family: var(--font-serif);
  font-size: 1.22rem;
}
.card-title .h-ic {
  display: inline-flex; align-items: center; gap: 9px;
}
.card-title .h-ic svg { width: 18px; height: 18px; color: var(--terracotta); }
.card.dark .card-title .h-ic svg { color: #f0a08c; }
.card-link { color: var(--muted); font-size: 0.84rem; font-weight: 500; }
.card.dark .card-link, .card.dark .row-sub, .card.dark .muted { color: rgba(255,255,255,.62); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
  background: var(--terracotta-soft); color: var(--terracotta);
}
.pill.medium { background: #faecd0; color: #b07614; }
.pill.low { background: var(--sage-soft); color: #5d6e48; }
.pill.ghost { background: rgba(255,255,255,.6); border: 1px solid var(--hairline); color: var(--ink-soft); }

/* rows */
.row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
.row:last-child { border-bottom: 0; }
.row .row-title { font-weight: 600; font-size: 0.9rem; }
.row .row-sub { color: var(--muted); font-size: 0.79rem; margin-top: 2px; }
.row .t { color: var(--muted-2); font-size: 0.76rem; }

.logo-dot {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 0.78rem; flex: none;
}
.checkbox {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--hairline-strong); flex: none;
  cursor: pointer; transition: all 0.2s var(--ease);
}
.checkbox:hover { border-color: var(--terracotta); }
.rank {
  width: 26px; height: 26px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--terracotta-soft); color: var(--terracotta);
  font-weight: 800; font-size: 0.82rem;
}
.circle-ic {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--sage-soft); color: var(--sage);
}
.circle-ic svg { width: 18px; height: 18px; }
.circle-ic.red { background: var(--terracotta-soft); color: var(--terracotta); }
.circle-ic.navy { background: rgba(7,29,58,.08); color: var(--navy); }

/* --------------------------- Dashboard grid ----------------------------- */
.dash-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr 1.12fr;
  gap: 18px;
  align-items: start;
}
.dash-grid .span-2 { grid-column: span 2; }

.assistant-list { display: grid; gap: 14px; margin-top: 14px; }
.assistant-item { display: grid; grid-template-columns: 40px 1fr; gap: 13px; align-items: center; }
.assistant-item .ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12);
}
.assistant-item .ic svg { width: 19px; height: 19px; }
.assistant-item b { font-size: 0.92rem; }

.metrics-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.metrics-2 small { color: var(--muted); font-size: 0.82rem; }
.metrics-2 strong { display: block; font-family: var(--font-serif); font-size: 2rem; font-weight: 500; margin-top: 4px; }
.trend-up { color: #3c8d4b; font-size: 0.8rem; font-weight: 600; }
.trend-down { color: var(--terracotta); font-size: 0.8rem; font-weight: 600; }

.bars { height: 110px; display: flex; align-items: flex-end; gap: 18px; border-top: 1px solid var(--hairline); padding-top: 16px; }
.bar-group { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 84px; }
.bar { width: 13px; border-radius: 6px 6px 0 0; background: var(--sage); transition: height 0.8s var(--ease); }
.bar.red { background: #e0785d; }
.bar-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 0.78rem; color: var(--muted); }
.bar-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-inline-end: 6px; }

.quick-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.quick-actions button {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 6px; border: 1px solid var(--hairline); border-radius: 14px;
  background: rgba(255,255,255,.5); color: var(--ink-soft);
  font-size: 0.76rem; font-weight: 500;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.quick-actions button:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--hairline-strong); }
.quick-actions button svg { width: 20px; height: 20px; color: var(--terracotta); }

.quote-card {
  display: flex; align-items: center; gap: 24px;
  background:
    radial-gradient(20rem 14rem at 100% 120%, rgba(127,143,106,.18), transparent 60%),
    var(--panel);
  overflow: hidden;
}
.quote-card .qm { font-family: var(--font-serif); font-size: 3rem; line-height: 0.4; color: var(--terracotta); font-style: italic; }
.quote-card blockquote { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.32; margin: 14px 0 6px; }
.quote-card .leaf {
  width: 150px; height: 110px; flex: none; border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(184,98,63,.22), transparent 60%),
    repeating-linear-gradient(125deg, #d7c7b1 0 12px, #e8ddcd 12px 24px);
  opacity: 0.85;
}

/* ----------------------------- Inbox layout ----------------------------- */
.inbox-grid {
  display: grid;
  grid-template-columns: 200px 280px 1fr 320px;
  gap: 16px;
  align-items: start;
}

.mailbox-nav { display: grid; gap: 4px; }
.mailbox-nav a {
  display: flex; align-items: center; gap: 11px; justify-content: flex-start;
  padding: 10px 12px; border-radius: 11px;
  color: var(--ink-soft); font-size: 0.9rem; font-weight: 500;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.mailbox-nav a svg { width: 17px; height: 17px; opacity: 0.75; }
.mailbox-nav a .count { margin-inline-start: auto; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.mailbox-nav a:hover { background: rgba(217,88,63,.06); color: var(--terracotta); }
.mailbox-nav a.active { background: var(--terracotta-soft); color: var(--terracotta); }
.mailbox-nav a.active .count { color: var(--terracotta); }

.label-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.seg {
  display: inline-flex; gap: 4px; padding: 5px;
  border-radius: 999px; border: 1px solid var(--hairline);
  background: rgba(255,255,255,.5); margin-bottom: 10px;
}
.seg button {
  border: 0; background: transparent; padding: 7px 16px; border-radius: 999px;
  font-size: 0.84rem; font-weight: 600; color: var(--muted);
  transition: all 0.25s var(--ease);
}
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.email-item {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center;
  padding: 13px 10px; border-radius: 13px; cursor: pointer;
  transition: background 0.16s var(--ease);
  border-bottom: 1px solid var(--hairline);
}
.email-item:hover { background: rgba(255,255,255,.6); }
.email-item.active { background: var(--terracotta-soft); }
.email-item.active .row-sub { color: #b06b56; }
.email-item .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta); }

.reader { min-height: 620px; }
.reader-toolbar {
  display: flex; gap: 6px; align-items: center;
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}
.reader-toolbar button {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: transparent; color: var(--muted);
  font-size: 0.82rem; font-weight: 500; padding: 8px 11px; border-radius: 9px;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.reader-toolbar button:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.reader-toolbar button svg { width: 16px; height: 16px; }
.reader-toolbar .grow { flex: 1; }

.reader h2 { font-family: var(--font-serif); font-size: 1.85rem; font-weight: 500; margin-bottom: 14px; }
.sender { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.sender .av {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(140deg,#e82323,#f0a000);
}
.sender b { display: block; font-size: 0.94rem; }
.sender small { color: var(--muted); font-size: 0.82rem; }
.sender .meta { margin-inline-start: auto; text-align: end; color: var(--muted); font-size: 0.8rem; }

.email-body { font-size: 0.94rem; line-height: 1.78; color: var(--ink-soft); }
.email-body ul { margin: 12px 0; padding-inline-start: 20px; }
.email-body li { margin: 5px 0; }

.attachment {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 0; padding: 14px 16px;
  border: 1px solid var(--hairline); border-radius: 14px;
  background: rgba(255,255,255,.5);
}
.attachment .file { display: flex; align-items: center; gap: 12px; }
.attachment .file .fic {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: var(--terracotta-soft); color: var(--terracotta);
}
.attachment .file b { font-size: 0.88rem; display: block; }
.attachment .file small { color: var(--muted); font-size: 0.78rem; }
.attachment .dl { display: flex; gap: 6px; color: var(--muted); }

.reply-box {
  margin-top: 18px; border: 1px solid var(--hairline); border-radius: 16px;
  padding: 16px; background: rgba(255,255,255,.55); position: relative;
}
.reply-box .txt { color: var(--ink-soft); font-size: 0.9rem; min-height: 56px; }
.reply-box .reply-actions {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  color: var(--muted);
}
.reply-box .reply-actions .grow { flex: 1; }
.reply-box .reply-actions svg { width: 17px; height: 17px; }

.side-stack { display: grid; gap: 16px; }
.suggest-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.suggest-row:last-child { border-bottom: 0; }
.suggest-row .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage); }
.suggest-row .ic svg { width: 16px; height: 16px; }
.suggest-row b { font-size: 0.86rem; display: block; }
.suggest-row small { color: var(--muted); font-size: 0.76rem; }

/* ---------------------------- Calendar layout --------------------------- */
.cal-layout { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }

.calendar-card { padding: 0; overflow: hidden; }
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--hairline);
}
.cal-header b { font-family: var(--font-serif); font-size: 1.15rem; }

.week {
  display: grid;
  grid-template-columns: 62px repeat(7, 1fr);
  position: relative;
}
.week .col { border-inline-end: 1px solid var(--hairline); position: relative; }
.week .col:last-child { border-inline-end: 0; }
.week .col-head {
  height: 62px; display: grid; place-items: center; gap: 2px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.82rem; color: var(--muted);
}
.week .col-head b { font-family: var(--font-serif); font-size: 1.05rem; color: var(--ink); font-weight: 500; }
.week .col-head.today b {
  background: var(--terracotta); color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
}
.week .allday {
  height: 40px; border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--muted-2);
}
.week .slot { height: 56px; border-bottom: 1px solid var(--hairline); }
.week .time-label { font-size: 0.72rem; color: var(--muted-2); text-align: center; padding-top: 6px; }

.ev {
  position: absolute; left: 6px; right: 6px;
  border-radius: 9px; padding: 8px 9px;
  font-size: 0.74rem; line-height: 1.25; overflow: hidden;
  border: 1px solid rgba(0,0,0,.04);
  cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.ev:hover { transform: translateY(-1px) scale(1.01); box-shadow: var(--shadow-sm); z-index: 5; }
.ev small { display: block; opacity: 0.75; font-size: 0.68rem; margin-top: 1px; direction: ltr; }
[dir="rtl"] .ev { text-align: right; }
.ev.green { background: #e9f2e2; color: #496436; }
.ev.red { background: #fbe5db; color: #a8412c; }
.ev.blue { background: #e6eef8; color: #2c5d8c; }
.ev.gold { background: #fbeccd; color: #9b6617; }
.ev.dashed { background: rgba(217,88,63,.04); border: 1.5px dashed var(--terracotta); color: var(--terracotta); }

.cal-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }

.plan-row { display: flex; align-items: center; gap: 13px; margin: 14px 0; }
.plan-row .ic {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--sage-soft); color: var(--sage);
}
.plan-row .ic.red { background: var(--terracotta-soft); color: var(--terracotta); }
.plan-row .ic svg { width: 19px; height: 19px; }
.plan-row b { display: block; font-size: 0.92rem; }
.plan-row small { color: var(--muted); font-size: 0.78rem; }

.focus-mini strong { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 500; }

/* ----------------------------- Toast ------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(120%);
  z-index: 300;
  display: flex; align-items: center; gap: 11px;
  padding: 13px 20px; border-radius: 14px;
  background: var(--navy); color: #fff;
  box-shadow: var(--shadow-lg); font-size: 0.9rem; font-weight: 500;
  transition: transform 0.4s var(--ease-spring);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast .tic { color: #8fd29b; display: inline-flex; }

/* ----------------------------- Responsive ------------------------------- */
.app-burger { display: none; }

@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid .span-2 { grid-column: span 2; }
  .inbox-grid { grid-template-columns: 260px 1fr; }
  .inbox-grid .mailbox-col, .inbox-grid .side-stack { grid-column: span 2; }
  .inbox-grid .mailbox-col { display: none; }
  .cal-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; left: 0; top: 0; z-index: 150; width: 280px;
    transform: translateX(-100%); transition: transform 0.35s var(--ease);
    background: var(--bg-2);
  }
  .app-sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .app-burger {
    display: grid; place-items: center; width: 44px; height: 44px; flex: none;
    border: 1px solid var(--hairline); border-radius: 12px; background: rgba(255,255,255,.6);
  }
  .app-burger svg { width: 20px; height: 20px; }
  .app-main { padding: 18px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .span-2 { grid-column: span 1; }
  .inbox-grid { grid-template-columns: 1fr; }
  .inbox-grid .reader-col, .inbox-grid .side-stack, .inbox-grid .list-col { grid-column: span 1; }
  .cal-lower { grid-template-columns: 1fr; }
  .quote-card .leaf { display: none; }
  .app-search { max-width: none; }
  .week { grid-template-columns: 48px repeat(7, minmax(70px, 1fr)); overflow-x: auto; }
  .cal-scroll { overflow-x: auto; }
}

@media (max-width: 560px) {
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .weather { display: none; }
  .metrics-2 { grid-template-columns: 1fr; }
}

/* scrim for mobile sidebar */
.scrim {
  position: fixed; inset: 0; z-index: 140; background: rgba(20,18,15,.4);
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
}
.scrim.show { opacity: 1; pointer-events: auto; }
@media (min-width: 861px) { .scrim { display: none; } }

/* ---- RTL: mobile sidebar slides in from the right (start side) ---- */
@media (max-width: 860px) {
  [dir="rtl"] .app-sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
  }
  [dir="rtl"] .app-sidebar.open { transform: none; }
}
