/* ═══ The menu as a navbar across the top (Shanti) ═══════════════════════════════════════════════════════════════
   core/nav.js draws the same sidebar (#sb: company, rows, groups, account); on a wide screen this sheet lays it out
   as two rows above the title bar, like a tabbed console:
     row 1  logo and company                                            name · role   [Sign out]
     row 2  Today · Owner dashboard · Alerts · Reports · Bookings & trips ▾ · Money ▾ · Inventory ▾ · Masters ▾
     row 3  the title bar as before (crumbs, title, + New)
   A group's tab opens its rows as a dropdown on hover, click or keyboard focus (no panel of every screen).
   The tab of the open screen (or the group it is in) is tinted with a line under it. Phones keep their menu. */
@media (min-width: 768px) {
  .app.shell.desk, .app.shell.desk.sb-mini {
    --sb-w: 0px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto var(--tb-h) minmax(0, 1fr);
    grid-template-areas: "rail" "top" "work";
  }
  .app.shell.desk.copilot-open {
    grid-template-columns: minmax(0, 1fr) var(--copilot-width, min(40%, 560px));
    grid-template-areas: "rail rail" "top top" "work copilot";
  }
  .app.shell.desk > .topbar > .nav-toggle { display: none !important; }
  .app.shell.desk .top-avatar { display: none !important; } /* the account is in the navbar's first row */

  .app.shell.desk > .sb {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top foot" "nav nav";
    align-items: center; column-gap: 16px; padding: 0 20px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--surface);
  }
  .app.shell.desk .sb-top { grid-area: top; height: 58px; padding: 0; }
  .app.shell.desk .sb-top .org { flex: none; max-width: 300px; }
  .app.shell.desk .sb-top .org-n { font-size: 15px; line-height: 20px; }
  .app.shell.desk .sb-home { margin-left: 0; }
  .app.shell.desk .sb-find, .app.shell.desk .sb-strip, .app.shell.desk .sb-foot > .ni, .app.shell.desk .sb-foot > .sb-fold { display: none !important; }

  /* row 1, right: the person and Sign out */
  .app.shell.desk .sb-foot { grid-area: foot; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; }
  .app.shell.desk .sb-foot > .me { display: flex; width: auto; height: 44px; margin: 0; padding: 0 8px; gap: 6px; }
  .app.shell.desk .sb-foot .me-t { align-items: flex-end; text-align: right; }
  .app.shell.desk .sb-foot .me-n { font-weight: 600; font-size: 14px; }
  .app.shell.desk .sb-foot .me > .av { display: none; }
  .app.shell.desk .sb-signout {
    height: 36px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink);
    font: 600 14px/1 var(--font-ui); cursor: pointer; box-shadow: var(--e1);
  }
  .app.shell.desk .sb-signout:hover { background: var(--surface-2); }
  .app.shell.desk .sb-signout:focus-visible { outline: none; box-shadow: var(--focus-ring); }

  /* row 2: the tabs */
  .app.shell.desk .sb-nav {
    grid-area: nav; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 2px; min-height: 44px; padding: 0; margin: 0 0 -1px;
    overflow: visible; -webkit-mask-image: none; mask-image: none;
  }
  .app.shell.desk .sb-nav.more-below { -webkit-mask-image: none; mask-image: none; }
  .app.shell.desk .sb-nav .blk { display: contents; }
  .app.shell.desk .sb .blk > .nr { display: contents; }
  .app.shell.desk .sb .blk .nadd { display: none; }
  .app.shell.desk .sb .ni, .app.shell.desk .sb .sg .gh .gt {
    width: auto; height: 42px; padding: 0 14px; gap: 8px; border-radius: 10px 10px 0 0; border-bottom: 2px solid transparent;
    color: var(--ink-2); font: 500 14px/20px var(--font-ui); letter-spacing: 0; text-transform: none; white-space: nowrap;
  }
  .app.shell.desk .sb .ni:hover, .app.shell.desk .sb .sg .gh .gt:not(.plain):hover { background: var(--sb-hover); color: var(--ink); text-decoration: none; }
  .app.shell.desk .sb .ni[aria-current="page"], .app.shell.desk .sb .ni.near, .app.shell.desk .sb .sg.here .gh .gt {
    background: var(--accent-soft); color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 600; box-shadow: none;
  }
  .app.shell.desk .sb .ni[aria-current="page"] > svg, .app.shell.desk .sb .sg.here .gh .gt > svg { color: var(--accent); }
  .app.shell.desk .sb .ni .nc, .app.shell.desk .sb .ni .why { display: none; }

  /* a group: its name with a caret; its rows drop down */
  .app.shell.desk .sb .sg, .app.shell.desk .sb .sg + .sg { position: relative; margin: 0; }
  .app.shell.desk .sb .gh { height: auto; }
  .app.shell.desk .sb .gfold, .app.shell.desk .sb .gall, .app.shell.desk .sb .gcnt { display: none !important; }
  .app.shell.desk .sb .sg .gh .gt::after {
    content: ""; width: 6px; height: 6px; margin: -3px 0 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); opacity: .6; transition: transform var(--t-fast);
  }
  .app.shell.desk .sb .sg.pins .gh .gt::after { display: none; }
  .app.shell.desk .sb .sg:hover .gh .gt, .app.shell.desk .sb .sg:focus-within .gh .gt { background: var(--sb-hover); color: var(--ink); }
  .app.shell.desk .sb .sg:hover .gh .gt::after, .app.shell.desk .sb .sg:focus-within .gh .gt::after { transform: translateY(3px) rotate(225deg); }
  .app.shell.desk .sb .sg .gi, .app.shell.desk .sb .sg.off .gi {
    display: none; position: absolute; top: calc(100% + 1px); left: 0; z-index: 60; min-width: 240px; max-height: min(70vh, 520px); overflow-y: auto;
    padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 0 10px 10px 10px; box-shadow: var(--e3, var(--e2));
  }
  .app.shell.desk .sb .sg:hover .gi, .app.shell.desk .sb .sg:focus-within .gi { display: block; }
  .app.shell.desk .sb .gi .ni, .app.shell.desk .sb .gi .nr .ni {
    width: 100%; height: 34px; padding: 0 10px; border-radius: 7px; border-bottom: 0; font-weight: 400;
  }
  .app.shell.desk .sb .gi .ni[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
  .app.shell.desk .sb .gi .nr { display: flex; align-items: center; }
  .app.shell.desk .sb .gi .ni.tmp { height: 30px; font-size: 13px; }
}
