/* 10 named app shell layouts */

.shell-classic,
.shell-top-saas,
.shell-settings,
.shell-bridge,
.shell-icon-rail,
.shell-workspace,
.shell-docs,
.shell-console,
.shell-inbox,
.shell-mobile {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* ========== 1. Classic Topbar + Sidebar ========== */
.shell-classic {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-width: 0;
  width: 100%;
  min-height: 26rem;
  background: var(--surface-raised);
}

.shell-classic__aside {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 0.85rem;
  border-right: 1px solid var(--border);
  background: #f7f9fb;
}

.shell-classic__brand {
  margin: 0 0.4rem 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

.shell-classic__aside a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.shell-classic__aside a:hover {
  background: #fff;
  color: var(--ink);
}

.shell-classic__aside a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shell-classic__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shell-classic__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.shell-classic__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shell-classic__main {
  min-width: 0;
  background: #fafbfc;
}

@media (max-width: 40rem) {
  .shell-classic {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
  }

  .shell-classic__aside {
    grid-row: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    gap: 0.25rem;
    min-width: 0;
  }

  .shell-classic__brand {
    width: 100%;
    margin: 0 0 0.35rem;
  }

  .shell-classic__aside a {
    padding: 0.4rem 0.55rem;
    font-size: 0.8125rem;
  }

  .shell-classic__topbar {
    flex-wrap: wrap;
    min-width: 0;
  }

  .shell-classic__actions {
    flex-wrap: wrap;
    min-width: 0;
  }

  .shell-classic__main {
    min-width: 0;
  }
}

/* ========== 2. Top-Only SaaS ========== */
.shell-top-saas {
  display: flex;
  flex-direction: column;
  min-height: 26rem;
  background: var(--surface-raised);
}

.shell-top-saas__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shell-top-saas__brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
  flex-shrink: 0;
}

.shell-top-saas__nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
}

.shell-top-saas__nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.shell-top-saas__nav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.shell-top-saas__nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shell-top-saas__end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.shell-top-saas__main {
  flex: 1;
  min-width: 0;
  background:
    linear-gradient(180deg, #f4f7fa 0%, #fafbfc 40%);
}

.shell-top-saas__pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.shell-top-saas__pagehead h3 {
  margin: 0 0 0.2rem;
}

.shell-top-saas__pagehead p {
  margin: 0;
}

@media (max-width: 40rem) {
  .shell-top-saas__bar {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .shell-top-saas__nav {
    order: 3;
    width: 100%;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
  }

  .shell-top-saas__end {
    margin-left: auto;
  }

  .shell-top-saas__pagehead {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========== 3. Settings Shell ========== */
.shell-settings {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 26rem;
  background: var(--surface-raised);
}

.shell-settings__topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shell-settings__crumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.shell-settings__crumb a {
  color: var(--accent-deep);
}

.shell-settings__crumb a:hover {
  text-decoration: underline;
}

.shell-settings__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0.75rem;
  border-right: 1px solid var(--border);
  background: #f7f9fb;
}

.shell-settings__nav-label {
  margin: 0 0.5rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.shell-settings__nav a {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.shell-settings__nav a:hover {
  background: #fff;
  color: var(--ink);
}

.shell-settings__nav a[aria-current="page"] {
  background: #fff;
  color: var(--accent-deep);
  box-shadow: inset 3px 0 0 var(--accent);
}

.shell-settings__panel {
  min-width: 0;
  padding: 1.25rem 1.35rem;
  background: #fafbfc;
}

.shell-settings__panel h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.shell-settings__panel > p {
  margin: 0 0 1.1rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.shell-settings__fields {
  display: grid;
  gap: 0.85rem;
  max-width: 26rem;
}

.shell-settings__field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.shell-settings__field input,
.shell-settings__field select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
}

.shell-settings__foot {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.15rem;
}

@media (max-width: 40rem) {
  .shell-settings {
    grid-template-columns: 1fr;
  }

  .shell-settings__nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .shell-settings__nav-label {
    width: 100%;
  }

  .shell-settings__nav a[aria-current="page"] {
    box-shadow: none;
    background: var(--accent-soft);
  }
}

/* ========== 4. Marketing → App Bridge ========== */
.shell-bridge {
  display: flex;
  flex-direction: column;
  min-height: 28rem;
  background: var(--surface-raised);
}

.shell-bridge__marketing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background:
    linear-gradient(120deg, #0d7a6f 0%, #1a4d5c 55%, #15202b 100%);
  color: #fff;
}

.shell-bridge__marketing-brand {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shell-bridge__marketing-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0.9;
}

.shell-bridge__marketing-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

.shell-bridge__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.35rem 1.25rem 1.5rem;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, #d9ebe8 0%, transparent 55%),
    #f7faf9;
  border-bottom: 1px solid var(--border);
}

.shell-bridge__copy h3 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.shell-bridge__copy p {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  max-width: 28rem;
}

.shell-bridge__copy .shell-btn + .shell-btn {
  margin-left: 0.45rem;
}

.shell-bridge__preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shell-shadow);
  min-height: 12rem;
}

.shell-bridge__preview-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: #f7f9fb;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.shell-bridge__preview-body {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  min-height: 9rem;
}

.shell-bridge__preview-rail {
  background: var(--shell-dark);
  padding: 0.55rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.shell-bridge__preview-rail span {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.12);
}

.shell-bridge__preview-main {
  padding: 0.75rem;
  background: #fafbfc;
}

.shell-bridge__preview-main .fake-line {
  height: 0.45rem;
  border-radius: 4px;
  background: #dfe5ee;
  margin-bottom: 0.45rem;
}

.shell-bridge__preview-main .fake-line:nth-child(1) {
  width: 55%;
  height: 0.65rem;
  background: #c5cedb;
}

.shell-bridge__preview-main .fake-line:nth-child(2) {
  width: 80%;
}

.shell-bridge__preview-main .fake-line:nth-child(3) {
  width: 70%;
}

.shell-bridge__signed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.15rem;
  background: #fff;
  font-size: 0.8125rem;
  min-width: 0;
}

.shell-bridge__signed strong {
  color: var(--accent-deep);
}

@media (max-width: 48rem) {
  .shell-bridge__hero {
    grid-template-columns: 1fr;
  }

  .shell-bridge__marketing-nav {
    display: none;
  }

  .shell-bridge__marketing {
    flex-wrap: wrap;
  }

  .shell-bridge__copy .shell-btn {
    margin: 0 0.45rem 0.45rem 0;
  }

  .shell-bridge__copy .shell-btn + .shell-btn {
    margin-left: 0;
  }

  .shell-bridge__signed {
    flex-wrap: wrap;
  }
}

/* ========== 5. Collapsible Icon Rail ========== */
.shell-icon-rail {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 26rem;
  background: var(--surface-raised);
  transition: grid-template-columns var(--motion);
}

.shell-icon-rail.is-collapsed {
  grid-template-columns: var(--rail-mini) minmax(0, 1fr);
}

.shell-icon-rail__aside {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 0.65rem;
  background: var(--shell-dark);
  color: #fff;
}

.shell-icon-rail__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin: 0 0.25rem 0.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shell-icon-rail.is-collapsed .shell-icon-rail__brand-text,
.shell-icon-rail.is-collapsed .shell-icon-rail__label {
  display: none;
}

.shell-icon-rail__aside a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.55rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--shell-dark-muted);
}

.shell-icon-rail__aside a:hover {
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}

.shell-icon-rail__aside a[aria-current="page"] {
  background: rgb(13 122 111 / 0.35);
  color: #fff;
}

.shell-icon-rail__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shell-icon-rail__main {
  min-width: 0;
  background: #fafbfc;
}

@media (max-width: 40rem) {
  .shell-icon-rail,
  .shell-icon-rail.is-collapsed {
    grid-template-columns: 1fr;
  }

  .shell-icon-rail__aside {
    grid-row: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .shell-icon-rail.is-collapsed .shell-icon-rail__brand-text,
  .shell-icon-rail.is-collapsed .shell-icon-rail__label {
    display: inline;
  }
}

/* ========== 6. Workspace Switcher ========== */
.shell-workspace {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 26rem;
  background: var(--surface-raised);
}

.shell-workspace__aside {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.75rem;
  border-right: 1px solid var(--border);
  background: #f7f9fb;
}

.shell-workspace__switcher {
  margin-bottom: 0.85rem;
}

.shell-workspace__switcher summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 700;
}

.shell-workspace__switcher summary::-webkit-details-marker {
  display: none;
}

.shell-workspace__switcher summary::after {
  content: "▾";
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 0.7rem;
}

.shell-workspace__switcher[open] summary {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.shell-workspace__orgs {
  margin: 0.35rem 0 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.shell-workspace__orgs a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.shell-workspace__orgs a:hover,
.shell-workspace__orgs a[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shell-workspace__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.shell-workspace__nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.shell-workspace__nav a:hover {
  background: #fff;
  color: var(--ink);
}

.shell-workspace__nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shell-workspace__user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: auto;
  padding: 0.65rem 0.5rem 0.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}

.shell-workspace__user strong {
  display: block;
  color: var(--ink);
  font-size: 0.8125rem;
}

.shell-workspace__user span {
  color: var(--ink-faint);
}

.shell-workspace__topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shell-workspace__main {
  min-width: 0;
  background: #fafbfc;
}

@media (max-width: 40rem) {
  .shell-workspace {
    grid-template-columns: 1fr;
  }

  .shell-workspace__aside {
    grid-row: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

/* ========== 7. Docs Content Shell ========== */
.shell-docs {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr) 10.5rem;
  grid-template-rows: auto 1fr;
  min-height: 28rem;
  background: var(--surface-raised);
}

.shell-docs__topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shell-docs__brand {
  font-weight: 800;
  color: var(--accent-deep);
  letter-spacing: -0.02em;
}

.shell-docs__nav {
  padding: 1rem 0.75rem;
  border-right: 1px solid var(--border);
  background: #f7f9fb;
}

.shell-docs__nav-label {
  margin: 0 0.4rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.shell-docs__nav a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.shell-docs__nav a:hover {
  background: #fff;
  color: var(--ink);
}

.shell-docs__nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.shell-docs__article {
  min-width: 0;
  padding: 1.35rem 1.5rem;
  background: #fff;
}

.shell-docs__article h3 {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.shell-docs__article p {
  margin: 0 0 0.85rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  max-width: 38rem;
}

.shell-docs__article h4 {
  margin: 1.15rem 0 0.4rem;
  font-size: 0.95rem;
}

.shell-docs__toc {
  padding: 1rem 0.85rem;
  border-left: 1px solid var(--border);
  background: #fafbfc;
}

.shell-docs__toc p {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.shell-docs__toc a {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  border-left: 2px solid transparent;
  padding-left: 0.55rem;
}

.shell-docs__toc a:hover,
.shell-docs__toc a[aria-current="true"] {
  color: var(--accent-deep);
  border-left-color: var(--accent);
}

@media (max-width: 56rem) {
  .shell-docs {
    grid-template-columns: 11rem minmax(0, 1fr);
  }

  .shell-docs__toc {
    display: none;
  }
}

@media (max-width: 40rem) {
  .shell-docs {
    grid-template-columns: 1fr;
  }

  .shell-docs__nav {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
  }

  .shell-docs__nav-label {
    width: 100%;
  }
}

/* ========== 8. Console / Ops Shell ========== */
.shell-console {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  min-height: 28rem;
  background: var(--shell-dark);
  color: #e8eef4;
}

.shell-console__aside {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.75rem;
  background: #101820;
  border-right: 1px solid rgb(255 255 255 / 0.08);
}

.shell-console__brand {
  margin: 0 0.35rem 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shell-console__aside a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--shell-dark-muted);
}

.shell-console__aside a:hover {
  background: rgb(255 255 255 / 0.06);
  color: #fff;
}

.shell-console__aside a[aria-current="page"] {
  background: rgb(13 122 111 / 0.3);
  color: #fff;
}

.shell-console__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: var(--shell-dark-raised);
}

.shell-console__topbar h3 {
  margin: 0;
  font-size: 0.95rem;
}

.shell-console__status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.55rem 1.1rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: #121c26;
  font-size: 0.75rem;
}

.shell-console__status span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--shell-dark-muted);
  font-weight: 600;
}

.shell-console__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #12b76a;
}

.shell-console__dot--warn {
  background: #f79009;
}

.shell-console__main {
  min-width: 0;
  padding: 1.1rem 1.2rem;
  background: #0f171f;
}

.shell-console__main h3 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 1rem;
}

.shell-console__main > p {
  margin: 0 0 1rem;
  color: var(--shell-dark-muted);
  font-size: 0.875rem;
}

.shell-console__panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.shell-console__panel {
  padding: 0.85rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 10px;
  background: var(--shell-dark-raised);
}

.shell-console__panel strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
}

.shell-console__panel p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--shell-dark-muted);
}

@media (max-width: 40rem) {
  .shell-console {
    grid-template-columns: 1fr;
  }

  .shell-console__aside {
    grid-row: auto;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
  }

  .shell-console__panels {
    grid-template-columns: 1fr;
  }
}

/* ========== 9. Inbox Split Shell ========== */
.shell-inbox {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 28rem;
  background: var(--surface-raised);
}

.shell-inbox__topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shell-inbox__brand {
  font-weight: 800;
  color: var(--accent-deep);
}

.shell-inbox__list {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #f7f9fb;
  min-height: 0;
}

.shell-inbox__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 700;
}

.shell-inbox__threads {
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  overflow: auto;
}

.shell-inbox__threads button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

.shell-inbox__threads button:hover {
  background: #fff;
}

.shell-inbox__threads button.is-active {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.shell-inbox__threads strong {
  display: block;
  font-size: 0.8125rem;
  margin-bottom: 0.15rem;
}

.shell-inbox__threads span {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-inbox__detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.shell-inbox__detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.shell-inbox__detail-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.shell-inbox__detail-head p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.shell-inbox__detail-body {
  flex: 1;
  padding: 1.15rem 1.2rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.shell-inbox__detail-body p {
  margin: 0 0 0.75rem;
}

.shell-inbox__composer {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

.shell-inbox__composer input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 40rem) {
  .shell-inbox {
    grid-template-columns: 1fr;
  }

  .shell-inbox__list {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: 11rem;
  }
}

/* ========== 10. Mobile Bottom Nav Shell ========== */
.shell-mobile {
  display: flex;
  flex-direction: column;
  min-height: 28rem;
  max-width: 24rem;
  width: 100%;
  margin-inline: auto;
  background: var(--surface-raised);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.shell-mobile__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.shell-mobile__topbar h3 {
  margin: 0;
  font-size: 1rem;
}

.shell-mobile__main {
  flex: 1;
  padding: 1.1rem 1rem 1.25rem;
  background: #fafbfc;
}

.shell-mobile__card {
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 0.75rem;
}

.shell-mobile__card h4 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}

.shell-mobile__card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.shell-mobile__tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  background: #fff;
}

.shell-mobile__tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 0.35rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-faint);
}

.shell-mobile__tabbar a span[aria-hidden="true"] {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 8px;
  background: #e8edf3;
}

.shell-mobile__tabbar a[aria-current="page"] {
  color: var(--accent-deep);
}

.shell-mobile__tabbar a[aria-current="page"] span[aria-hidden="true"] {
  background: var(--accent-soft);
}

.shell-mobile__frame-note {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-faint);
  background: #e8edf3;
}
