/* ---------- App shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns var(--duration) var(--ease);
}

.shell--collapsed { grid-template-columns: var(--sidebar-compact) minmax(0, 1fr); }

.shell__main { min-width: 0; display: flex; flex-direction: column; }

.shell__content {
  position: relative;
  isolation: isolate;
  /* Bottom padding clears the fixed .feedback-trigger corner button so it
     never overlaps a page's own trailing action buttons. */
  padding: 1.5rem var(--content-gutter) 4rem;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

.shell__overlay { display: none; }

.mobile-nav {
  display: none;
}

/* Sidebar: the night-teal frame. It stays dark in both themes, so it reads
   only the --sidebar-* tokens. Gold marks the current page (the logo's
   center dot). */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-muted);
  padding: 1rem .75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-color: var(--sidebar-raised) transparent;
}

.sidebar__mobile-footer, .sidebar__close { display: none; }

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .25rem .5rem 1rem;
  margin-bottom: .5rem;
}
.sidebar__brand:hover { text-decoration: none; }
.sidebar__logo {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  flex: none;
}
.sidebar__logo img { display: block; width: 100%; height: 100%; }
.sidebar__name { font-weight: 700; font-size: var(--text-heading); color: var(--sidebar-ink); }
.shell--collapsed .sidebar {
  padding-inline: .5rem;
}
.shell--collapsed .sidebar__brand {
  justify-content: center;
  padding-inline: 0;
}
.shell--collapsed .sidebar__name,
.shell--collapsed .nav__label,
.shell--collapsed .nav__section {
  display: none;
}
.shell--collapsed .nav__item {
  justify-content: center;
  gap: 0;
  padding-inline: .5rem;
}
.shell--collapsed .nav__item--active::after { display: none; }
/* Compact mode has no headers, so every icon stays reachable. */
.shell--collapsed .nav__group-items[hidden] { display: flex; }
.shell--collapsed .nav__icon {
  width: 2.25rem;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__group-items { display: flex; flex-direction: column; gap: 2px; }
.nav__group-items[hidden] { display: none; }
/* Collapsible section header. */
.nav__section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  min-height: 2.25rem;
  margin-top: .5rem;
  padding: .375rem .75rem;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--sidebar-muted);
  font: inherit;
  font-size: var(--text-label);
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: color var(--duration) var(--ease);
}
.nav__section:hover { color: var(--sidebar-ink); }
.nav__section:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav__chevron {
  width: .875rem;
  height: .875rem;
  flex: none;
  transition: transform var(--duration) var(--ease);
}
.nav__section[aria-expanded="false"] .nav__chevron { transform: rotate(-90deg); }
[dir="rtl"] .nav__section[aria-expanded="false"] .nav__chevron { transform: rotate(90deg); }
.nav__item {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 40px;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  color: var(--sidebar-muted);
  text-decoration: none;
  font-size: var(--text-body);
  font-weight: 500;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.nav__item:hover { background: var(--sidebar-raised); text-decoration: none; color: var(--sidebar-ink); }
.nav__item--active {
  background: var(--sidebar-raised);
  color: var(--sidebar-ink);
  font-weight: 600;
}
.nav__item--active::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-inline-start: auto;
  border-radius: 50%;
  background: var(--accent);
}
.nav__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav__icon {
  width: 1.25rem;
  display: inline-grid;
  place-items: center;
  flex: none;
}

.nav__icon .app-icon {
  width: 1.12rem;
  height: 1.12rem;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* The bar spans the full width, but its contents line up with the
     centered page column below it. */
  padding-block: .75rem;
  padding-inline: max(var(--content-gutter), calc((100% - var(--content-max)) / 2 + var(--content-gutter)));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__start { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.topbar__titles { min-width: 0; }
.topbar__menu {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-heading);
  cursor: pointer;
  color: var(--ink);
}
.topbar__menu:hover {
  background: var(--brand-light);
  border-color: var(--success-border);
}
.topbar__menu-icon {
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.topbar__menu-icon .app-icon {
  width: 1.2rem;
  height: 1.2rem;
}
.topbar__title { overflow: hidden; font-weight: 800; font-size: var(--text-heading); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.topbar__subtitle { overflow: hidden; color: var(--muted); font-size: var(--text-small); text-overflow: ellipsis; white-space: nowrap; }

.topbar__end { display: flex; align-items: center; gap: 1rem; }
.topbar__user { display: flex; align-items: center; gap: .5rem; min-width: 0; flex-shrink: 1; }
.topbar__user-link {
  display: flex; align-items: center; gap: .5rem; min-width: 0;
  color: inherit; text-decoration: none; border-radius: var(--radius);
}
.topbar__user-link:hover { text-decoration: none; }
.topbar__user-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.topbar__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 800;
  flex-shrink: 0;
}
.topbar__userinfo { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.topbar__username {
  overflow: hidden;
  max-width: 12rem;
  font-weight: 700;
  font-size: var(--text-body);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.topbar__role { color: var(--muted); font-size: var(--text-label); }
.notif-bell {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  position: relative;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.notif-bell:hover {
  background: var(--brand-light);
  border-color: var(--brand-border);
  color: var(--brand-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.notif-bell__icon {
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.notif-bell__icon .app-icon {
  width: 1.15rem;
  height: 1.15rem;
}
.notif-bell__count {
  min-width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  position: absolute;
  inset-block-start: -.38rem;
  inset-inline-end: -.38rem;
  padding: 0 .25rem;
  color: var(--on-brand);
  background: var(--danger);
  border: 2px solid var(--surface);
  border-radius: var(--radius-pill);
  font-size: var(--text-micro);
  font-weight: 800;
  line-height: 1;
}
.topbar__logout {
  flex-shrink: 0;
  background: none; border: 1px solid var(--border); color: var(--danger);
  border-radius: var(--radius); padding: .375rem .75rem; cursor: pointer; font-size: var(--text-small); font-weight: 700;
}
.topbar__logout:hover { background: var(--danger-bg); }
.topbar-search { display: inline-flex; flex-shrink: 0; align-items: center; gap: .375rem; min-height: 38px; padding: .375rem .5rem; color: var(--muted); cursor: pointer; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: var(--text-label); }
.topbar-search:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.topbar-search .app-icon { width: 1rem; height: 1rem; }
.topbar-search kbd { padding: .125rem .25rem; color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); font-size: var(--text-micro); }

.command-palette { width: min(620px, calc(100% - 1.5rem)); max-height: min(680px, calc(100vh - 2rem)); padding: 0; color: var(--ink); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.command-palette::backdrop { background: color-mix(in srgb, var(--shadow-color) 45%, transparent); }
.command-palette__panel { overflow: clip; }
.command-palette__head { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.command-palette__head:focus-within { box-shadow: inset 0 -2px 0 var(--brand); }
.command-palette__head > .app-icon { width: 1.1rem; color: var(--brand); }
.command-palette__head input { flex: 1; min-width: 0; padding: .375rem 0; border: 0; outline: 0; font: inherit; font-size: var(--text-lead); background: transparent; }
.command-palette__head button { width: 30px; height: 30px; color: var(--muted); cursor: pointer; border: 0; border-radius: var(--radius-sm); background: var(--surface-soft); font-size: var(--text-heading); }
.command-palette__results { max-height: 430px; overflow-y: auto; padding: .5rem; color: var(--muted); font-size: var(--text-small); }
.command-palette__status { margin: 0; padding: .75rem .75rem; }
.command-palette__status--error { color: var(--danger); }
.command-palette__results h3 { margin: .5rem .5rem .25rem; color: var(--muted); font-size: var(--text-micro); font-weight: 700; }
.command-result { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem .75rem; color: var(--ink); border-radius: var(--radius); text-decoration: none; }
.command-result:hover, .command-result:focus { outline: none; color: var(--brand); background: var(--brand-light); text-decoration: none; }
.command-result > span:first-child { min-width: 0; }
.command-result strong, .command-result small { overflow: hidden; display: block; white-space: nowrap; text-overflow: ellipsis; }
.command-result small { margin-top: .125rem; color: var(--muted); font-size: var(--text-label); }
.command-result__type { flex-shrink: 0; padding: .25rem .375rem; color: var(--muted); border-radius: var(--radius-pill); background: var(--surface-soft); font-size: var(--text-micro); }
.command-palette__hint { margin: 0; padding: .5rem 1rem; color: var(--muted); border-top: 1px solid var(--border); font-size: var(--text-micro); }
.btn--active { color: var(--brand); border-color: var(--brand); background: var(--brand-light); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* transform: translateZ(0) forces its own compositing layer -- without it,
   Safari can detach a `position: fixed` + `backdrop-filter` element during
   momentum scrolling and let it drift to a mid-screen position before
   snapping back once scrolling settles. */
.feedback-trigger { position: fixed; z-index: 24; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; inset-inline-end: 1rem; bottom: 1rem; color: var(--brand); cursor: pointer; border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transform: translateZ(0); -webkit-transform: translateZ(0); }
.feedback-trigger .app-icon { width: 1.15rem; height: 1.15rem; }
.feedback-trigger:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.shell__content:has(.form-actions--sticky) > .feedback-trigger { position: static; margin-block-start: 1rem; margin-inline-start: auto; }
.feedback-dialog { width: min(430px, calc(100% - 1.5rem)); padding: 0; color: var(--ink); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.feedback-dialog::backdrop { background: color-mix(in srgb, var(--shadow-color) 45%, transparent); }
.feedback-dialog__form { display: grid; gap: 1rem; padding: 1rem; }
.feedback-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.feedback-dialog__head h2 { margin: 0; font-size: var(--text-lead); }
.feedback-dialog__head p { margin: .125rem 0 0; color: var(--muted); font-size: var(--text-small); }
.feedback-dialog__head button { width: 30px; height: 30px; cursor: pointer; border: 0; border-radius: var(--radius-sm); background: var(--surface-soft); font-size: var(--text-heading); }
.feedback-dialog fieldset { padding: 0; border: 0; }
.feedback-dialog legend, .feedback-dialog label { color: var(--ink); font-size: var(--text-small); font-weight: 700; }
.feedback-ratings { display: grid; grid-template-columns: repeat(5, 1fr); gap: .375rem; margin-top: .5rem; }
.feedback-ratings input { position: absolute; opacity: 0; }
.feedback-ratings span { display: grid; place-items: center; min-height: 40px; cursor: pointer; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.feedback-ratings input:checked + span { color: var(--on-brand); border-color: var(--brand); background: var(--brand); }
.feedback-ratings label:has(input:focus-visible) span { outline: 3px solid var(--brand); outline-offset: 3px; }
.feedback-dialog textarea { display: block; width: 100%; margin-top: .375rem; }
.feedback-dialog__thanks { display: grid; justify-items: center; gap: 1rem; padding: 2rem 1.25rem; color: var(--success); text-align: center; font-weight: 800; }
.feedback-dialog__thanks[hidden] { display: none; }
.feedback-dialog__thanks p { margin: 0; }
.feedback-dialog__error { margin: 0; padding: .75rem .75rem; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent); border-radius: var(--radius); background: var(--danger-bg); font-size: var(--text-small); }

/* Privacy controls stay available on every Firebase-enabled surface. */
.analytics-consent {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(720px, calc(100% - 2rem));
  margin: 1rem auto;
  padding: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.analytics-consent[hidden] { display: none; }
.analytics-consent__copy { min-width: 0; }
.analytics-consent__copy h2 { margin: 0; font-size: var(--text-lead); font-weight: 800; }
.analytics-consent__copy p { margin: .25rem 0 0; color: var(--muted); font-size: var(--text-small); line-height: 1.55; }
.analytics-consent__actions { display: flex; flex: 0 0 auto; gap: .5rem; }
.topbar__privacy {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}
.topbar__privacy:hover { color: var(--ink); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.landing-footer__links button {
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
}
.landing-footer__links button:hover { color: var(--brand); }
.analytics-dialog {
  width: min(480px, calc(100% - 1.5rem));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.analytics-dialog::backdrop { background: color-mix(in srgb, var(--shadow-color) 45%, transparent); }
.analytics-dialog__card { display: grid; gap: 1.25rem; padding: 1.25rem; }
.analytics-dialog__card h2 { margin: 0; font-size: var(--text-heading); }
.analytics-dialog__card p { margin: .375rem 0 0; color: var(--muted); font-size: var(--text-body); }
.analytics-dialog__status { font-weight: 700; }
.analytics-dialog__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

@media (max-width: 860px) {
  .feedback-trigger { bottom: calc(5.3rem + env(safe-area-inset-bottom)); }
  .topbar-search span, .topbar-search kbd { display: none; }

  .analytics-consent {
    align-items: stretch;
    flex-direction: column;
    gap: .75rem;
  }
  .analytics-consent__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .analytics-consent__actions .btn { width: 100%; }
  .analytics-dialog__actions { display: grid; }
  .analytics-dialog__actions .btn { width: 100%; }
}

@media (max-width: 420px) {
  .analytics-consent__actions { grid-template-columns: 1fr; }
}

/* Mobile primary navigation */
.mobile-nav {
  position: fixed;
  inset-inline: .75rem;
  bottom: max(.65rem, env(safe-area-inset-bottom));
  z-index: 28;
  padding: .375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  /* Own compositing layer -- see .feedback-trigger comment above. Without
     this, iOS Safari can let the bar drift mid-screen during a scroll fling
     before it snaps back to the viewport edge. */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.mobile-nav__item {
  display: grid;
  grid-template-rows: 1.3rem auto;
  place-items: center;
  gap: .125rem;
  min-width: 0;
  min-height: 50px;
  padding: .375rem .25rem;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.mobile-nav__more {
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.mobile-nav__item:hover {
  color: var(--brand-dark);
  background: var(--brand-light);
  text-decoration: none;
}

.mobile-nav__item--active {
  color: var(--brand-dark);
  background: var(--brand-light);
}

.mobile-nav__icon {
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.mobile-nav__icon .app-icon {
  width: 1.08rem;
  height: 1.08rem;
}

.mobile-nav__label {
  overflow: hidden;
  max-width: 100%;
  font-size: var(--text-micro);
  font-weight: 800;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Theme switcher */
.theme-switch {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.theme-switch__option {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.theme-switch__option:hover { color: var(--ink); }
.theme-switch__option[aria-pressed="true"] { color: var(--brand-dark); background: var(--surface); box-shadow: var(--shadow-sm); }
.theme-switch__option:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.theme-switch__option .app-icon { width: 1rem; height: 1rem; }

.sidebar .theme-switch { display: flex; border-color: color-mix(in srgb, var(--sidebar-ink) 18%, transparent); background: transparent; }
.sidebar .theme-switch__option { flex: 1; color: var(--sidebar-muted); }
.sidebar .theme-switch__option[aria-pressed="true"] { color: var(--sidebar-ink); background: var(--sidebar-raised); box-shadow: none; }
.sidebar .theme-switch__option:focus-visible { outline-color: var(--accent); }
.sidebar .lang-switch__link { color: var(--sidebar-muted); background: transparent; }
.sidebar .lang-switch__link:not(.lang-switch__link--active):hover { color: var(--sidebar-ink); background: var(--sidebar-raised); }
.sidebar .lang-switch__link--active { color: var(--sidebar-ink); background: var(--sidebar-raised); }

/* Language switcher */
.lang-switch {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: clip;
}
.lang-switch__link {
  padding: .25rem .5rem;
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  background: var(--surface);
}
.lang-switch__link:not(.lang-switch__link--active):hover { background: var(--brand-light); text-decoration: none; }
.lang-switch__link--active { background: var(--brand); color: var(--on-brand); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .shell--collapsed { grid-template-columns: 1fr; }
  .shell--collapsed .sidebar {
    padding: 1rem 1rem;
  }
  .shell--collapsed .sidebar__brand {
    justify-content: flex-start;
    padding: .375rem .5rem 1rem;
  }
  .shell--collapsed .sidebar__name,
  .shell--collapsed .nav__label,
  .shell--collapsed .nav__section {
    display: initial;
  }
  .shell--collapsed .nav__section {
    display: flex;
  }
  .shell--collapsed .nav__item {
    justify-content: flex-start;
    gap: .75rem;
    padding: .5rem .75rem;
  }
  .shell--collapsed .nav__item--active::after { display: block; }
  .shell--collapsed .nav__icon {
    width: 1.4rem;
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset-inline-start: 0;
    top: 0;
    width: var(--sidebar-width);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform var(--duration) var(--ease);
  }
  .sidebar .nav { flex: 1; }
  .sidebar__brand { padding-inline-end: 3rem; }
  .sidebar__close {
    position: absolute;
    top: .75rem;
    inset-inline-end: .75rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--sidebar-ink) 18%, transparent);
    border-radius: var(--radius);
    background: transparent;
    color: var(--sidebar-ink);
    font: inherit;
    font-size: var(--text-title);
    cursor: pointer;
  }
  .sidebar__mobile-footer {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
    padding: 1rem .5rem .25rem;
    border-top: 1px solid color-mix(in srgb, var(--sidebar-ink) 12%, transparent);
  }
  .sidebar__user {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
  }
  .sidebar__avatar {
    width: 38px;
    height: 38px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: var(--sidebar-ink);
    background: var(--sidebar-raised);
    border-radius: 50%;
    font-weight: 800;
  }
  .sidebar__user > div:last-child {
    min-width: 0;
    display: grid;
    line-height: 1.3;
  }
  .sidebar__user strong {
    overflow: hidden;
    color: var(--sidebar-ink);
    font-size: var(--text-body);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sidebar__user span {
    color: var(--sidebar-muted);
    font-size: var(--text-label);
  }
  .sidebar__mobile-actions {
    display: flex;
    align-items: stretch;
    gap: .5rem;
  }
  .sidebar__mobile-actions .lang-switch {
    flex: 1;
    border-color: color-mix(in srgb, var(--sidebar-ink) 18%, transparent);
  }
  .sidebar__mobile-actions .lang-switch__link {
    flex: 1;
    display: grid;
    min-height: 44px;
    place-items: center;
  }
  .sidebar__mobile-actions .button_to { flex: 1; }
  .sidebar__logout {
    width: 100%;
    min-height: 40px;
    padding: .375rem .75rem;
    color: var(--sidebar-ink);
    cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--sidebar-ink) 18%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--sidebar-ink) 8%, transparent);
    font: inherit;
    font-size: var(--text-label);
    font-weight: 700;
  }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .shell--open .sidebar { transform: translateX(0); }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sync-status { visibility: hidden; }
  .shell--open .shell__overlay {
    display: block;
    position: fixed; inset: 0; background: color-mix(in srgb, var(--shadow-color) 40%, transparent); z-index: 30;
  }
}


