/* The shell every Composer Benchmark section shares (Admin::Composer::ShellComponent): app bar with the section tabs,
   the optional sub-menu and the page's padding. Every rule sits under .cbs; tokens come from composer_benchmark_tokens.css. */
.cbs { min-height: 100vh; background: var(--page); }
.cbs > .appbar, .cbs .submenu { color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
.cbs .cb.cbm { padding: 0; }

/* App bar */
.cbs > .appbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 32px; background: var(--page); border-bottom: 1px solid var(--line); }
.cbs .appbar .navbtn { width: 44px; height: 44px; margin-left: -12px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.cbs .appbar .navbtn:hover { background: var(--paper); color: var(--ink); }
.cbs .appbar .brand { display: flex; align-items: center; gap: 10px; }
.cbs .appbar .mark { width: 30px; height: 30px; border-radius: 8px; background: #234b75; display: grid; place-items: center; }
.cbs .appbar .mark svg { width: 18px; height: 18px; }
.cbs .appbar .brand b { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.cbs .appbar .tabs { display: flex; gap: 2px; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.cbs .appbar .tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border-radius: 9px; font-size: 0.86rem; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.cbs .appbar .tabs a:hover { color: var(--ink); }
.cbs .appbar .tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.cbs .appbar .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; flex: none; }
.cbs .appbar :focus-visible, .cbs .submenu :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Page, with the sub-menu beside it */
.cbs > .app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 24px 32px 48px; }
.cbs > .app.withmenu { grid-template-columns: 220px minmax(0, 1fr); }
.cbs .app > .pane { min-width: 0; }

/* A bleed page (a labeller job) fills the viewport below the app bar and scrolls inside itself */
.cbs.bleed { height: 100vh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.cbs.bleed > .app, .cbs.bleed .app > .pane { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; }
.cbs.bleed .pane > .cb-job { flex: 1; height: auto; }

/* Sub-menu (the Manager's) */
.cbs .submenu { position: sticky; top: 82px; align-self: start; font-size: 14px; }
.cbs .submenu .links { display: flex; flex-direction: column; gap: 2px; }
.cbs .submenu a { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; text-decoration: none; padding: 8px 10px; border-radius: 10px; color: var(--muted); }
.cbs .submenu a:hover { background: var(--paper); color: var(--ink); }
.cbs .submenu a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.cbs .submenu .tick { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.cbs .submenu a[aria-current="page"] .tick { color: var(--accent); }
.cbs .submenu .name { font-size: 0.86rem; font-weight: 600; line-height: 1.25; }
.cbs .submenu .count { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 0 7px; font-weight: 500; }
.cbs .submenu .total { margin-top: 6px; font: inherit; font-size: 0.72rem; color: var(--muted); padding-inline: 10px; border: 0; background: none; text-align: left; cursor: pointer; }
.cbs .submenu kbd { font-family: var(--mono); font-size: 0.68rem; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--paper); color: var(--muted); }
.cbs .submenu .menutoggle { display: none; }

@media (max-width: 1100px) {
  .cbs.bleed { height: auto; min-height: 100vh; overflow: visible; }
  .cbs.bleed .pane > .cb-job { flex: none; min-height: 0; }
}
@media (max-width: 1023px) {
  .cbs > .appbar { padding-inline: 24px; }
  .cbs > .app { padding-inline: 24px; }
}
@media (max-width: 760px) {
  .cbs > .appbar { position: static; padding: 6px 16px 10px; }
  .cbs .appbar .avatar { margin-left: auto; }
  .cbs .appbar .tabs { order: 3; flex-basis: 100%; margin-left: 0; overflow-x: auto; }
  .cbs .appbar .tabs a { flex: 1 0 auto; min-height: 44px; padding: 0 6px; font-size: 0.8rem; }
  .cbs > .app, .cbs > .app.withmenu { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 48px; }
  .cbs .submenu { position: static; }
  .cbs .submenu .menutoggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
  .cbs .submenu .menutoggle svg { margin-left: auto; transition: transform 0.15s; }
  .cbs .submenu .menutoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .cbs .submenu .links:not(.open) { display: none; }
  .cbs .submenu .links { margin-top: 6px; }
  .cbs .submenu a { min-height: 44px; }
  .cbs .submenu .total { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cbs * { transition: none !important; } }
