/* Beyond the Line desktop enhancement. Mobile remains unchanged. */
#btl-desktop-nav { display:none; }

@media (min-width: 900px) {
  html { background:#edf2ee; }
  body.desktop-ready { padding:0; min-height:100vh; background:#edf2ee; }
  body.desktop-ready #root { margin-left:260px; min-height:100vh; }
  body.desktop-ready .app-shell {
    width:auto;
    max-width:1500px;
    min-height:calc(100vh - 40px);
    margin:20px;
    border-radius:24px;
    box-shadow:0 14px 38px rgba(18,59,44,.10);
    overflow:hidden;
  }
  #btl-desktop-nav {
    position:fixed;
    inset:0 auto 0 0;
    width:260px;
    z-index:80;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    padding:24px 16px 18px;
    background:#123b2c;
    color:#fff;
    box-shadow:8px 0 24px rgba(18,59,44,.12);
  }
  #btl-desktop-nav .desktop-brand { padding:4px 8px 22px; border-bottom:1px solid rgba(255,255,255,.14); }
  #btl-desktop-nav .desktop-brand small { display:block; color:#b7ccbf; font-size:10px; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
  #btl-desktop-nav .desktop-brand strong { display:block; margin-top:7px; font-size:20px; line-height:1.05; }
  #btl-desktop-nav .desktop-user { margin:14px 5px 8px; padding:11px 12px; border-radius:12px; background:rgba(255,255,255,.08); }
  #btl-desktop-nav .desktop-user strong { display:block; font-size:13px; }
  #btl-desktop-nav .desktop-user span { display:block; margin-top:3px; color:#c6d6cc; font-size:11px; line-height:1.3; }
  #btl-desktop-nav nav { display:grid; gap:5px; margin-top:8px; overflow:auto; padding-right:2px; }
  #btl-desktop-nav nav button { border:0; border-radius:10px; min-height:42px; padding:9px 11px; text-align:left; background:transparent; color:#e9f2ec; font-size:12px; font-weight:800; cursor:pointer; }
  #btl-desktop-nav nav button:hover, #btl-desktop-nav nav button:focus-visible { background:rgba(255,255,255,.11); outline:none; }
  #btl-desktop-nav nav button.active { background:#fff; color:#123b2c; }
  #btl-desktop-nav .desktop-footer { margin-top:auto; padding:14px 8px 0; color:#a9c0b1; font-size:10px; line-height:1.45; border-top:1px solid rgba(255,255,255,.14); }

  body.desktop-ready .topbar { padding:22px 28px; }
  body.desktop-ready .topbar h1 { font-size:27px; }
  body.desktop-ready .tool-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
  body.desktop-ready .tool-card { min-height:112px; }
  body.desktop-ready .status-grid,
  body.desktop-ready .readiness-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  body.desktop-ready .mini-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
  body.desktop-ready .management-report-hero { grid-template-columns:minmax(0,2fr) minmax(260px,1fr); }
  body.desktop-ready .management-cleaning-list { grid-template-columns:repeat(2,minmax(0,1fr)); display:grid; gap:10px; }
  body.desktop-ready .record-list,
  body.desktop-ready .staff-list,
  body.desktop-ready .incident-list { grid-template-columns:repeat(2,minmax(0,1fr)); display:grid; gap:10px; }
  body.desktop-ready .form-card,
  body.desktop-ready .status-card,
  body.desktop-ready .progress-panel,
  body.desktop-ready .section-card { max-width:none; }
  body.desktop-ready .page-content,
  body.desktop-ready .content-shell { max-width:none; }
}

/* v12.4.2 role preview controls */
@media (min-width:900px){
  #btl-desktop-nav .desktop-role-slot{margin:8px 0 4px}
  #btl-desktop-nav .desktop-role-switch{display:grid;gap:5px;padding:8px 5px 10px;border-bottom:1px solid rgba(255,255,255,.14)}
  #btl-desktop-nav .desktop-role-switch small{padding:0 6px 3px;color:#9fbaaa;font-size:9px;font-weight:900;letter-spacing:.12em}
  #btl-desktop-nav .desktop-role-switch button{min-height:34px;border:1px solid rgba(255,255,255,.14);border-radius:9px;background:rgba(255,255,255,.05);color:#e9f2ec;padding:7px 9px;text-align:left;font-size:10px;font-weight:900;cursor:pointer}
  #btl-desktop-nav .desktop-role-switch button:hover,#btl-desktop-nav .desktop-role-switch button:focus-visible{background:rgba(255,255,255,.12);outline:none}
  #btl-desktop-nav .desktop-role-switch button.active{background:#fff;color:#123b2c;border-color:#fff}
  #btl-desktop-nav nav.desktop-tools{margin-top:8px}
}

/* v12.4.5 sidebar stability: keep role controls visible and make the tool list the only scrolling region. */
@media (min-width:900px){
  #btl-desktop-nav{overflow:hidden}
  #btl-desktop-nav .desktop-brand,
  #btl-desktop-nav .desktop-user,
  #btl-desktop-nav .desktop-role-slot,
  #btl-desktop-nav .desktop-footer{flex:0 0 auto}
  #btl-desktop-nav nav.desktop-tools{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    padding-bottom:10px;
  }
  #btl-desktop-nav nav.desktop-tools button[data-recipe-nav="true"]{
    font-weight:900;
  }
}


/* v6.93 FINAL SIDEBAR BRAND LOCK
   Keep the sage rail visually continuous: no white selected blocks, no workspace bleed. */
@media (min-width:900px){
  :root{
    --btl-sidebar-w:244px;
    --btl-sidebar-sage:#8A9A84;
    --btl-sidebar-sage-active:#A7B3A2;
    --btl-sidebar-ink:#26372F;
    --btl-workspace-stone:#EEF1EB;
  }
  body.desktop-ready{overflow-x:hidden!important;background:var(--btl-workspace-stone)!important}
  body.desktop-ready #btl-desktop-nav{
    left:0!important;right:auto!important;width:var(--btl-sidebar-w)!important;max-width:var(--btl-sidebar-w)!important;
    z-index:1000!important;background:var(--btl-sidebar-sage)!important;color:var(--btl-sidebar-ink)!important;
    box-sizing:border-box!important;overflow:hidden!important;border-right:1px solid rgba(38,55,47,.12)!important;
    box-shadow:4px 0 14px rgba(38,55,47,.05)!important;
  }
  body.desktop-ready #root{
    position:relative!important;z-index:1!important;margin-left:var(--btl-sidebar-w)!important;
    width:calc(100vw - var(--btl-sidebar-w))!important;max-width:calc(100vw - var(--btl-sidebar-w))!important;
    min-width:0!important;box-sizing:border-box!important;overflow-x:hidden!important;
  }
  body.desktop-ready .app-shell{
    margin:24px!important;width:calc(100% - 48px)!important;max-width:calc(100% - 48px)!important;
    min-width:0!important;box-sizing:border-box!important;overflow:hidden!important;
  }
  #btl-desktop-nav .desktop-user{
    background:rgba(255,255,255,.13)!important;color:var(--btl-sidebar-ink)!important;
  }
  #btl-desktop-nav .desktop-user span,
  #btl-desktop-nav .desktop-role-switch small,
  #btl-desktop-nav .desktop-footer{color:rgba(38,55,47,.76)!important}
  #btl-desktop-nav nav button,
  #btl-desktop-nav .desktop-role-switch button{
    color:var(--btl-sidebar-ink)!important;background:transparent!important;border-color:rgba(38,55,47,.14)!important;
    box-shadow:none!important;
  }
  #btl-desktop-nav nav button:hover,
  #btl-desktop-nav nav button:focus-visible,
  #btl-desktop-nav .desktop-role-switch button:hover,
  #btl-desktop-nav .desktop-role-switch button:focus-visible{
    background:rgba(255,255,255,.12)!important;color:var(--btl-sidebar-ink)!important;
  }
  #btl-desktop-nav nav button.active,
  #btl-desktop-nav .desktop-role-switch button.active{
    background:var(--btl-sidebar-sage-active)!important;color:var(--btl-sidebar-ink)!important;
    border:1px solid rgba(38,55,47,.22)!important;box-shadow:inset 3px 0 0 #8E1F2F!important;
  }
  #btl-desktop-nav nav button.active::before{display:none!important}
}


/* BUILD-20260826-015 — permanent desktop shell standard. */
@media (min-width:900px){
  #btl-desktop-nav .desktop-brand{padding:4px 8px 18px}
  #btl-desktop-nav .desktop-brand strong{font-family:"Cormorant Garamond",Georgia,"Times New Roman",serif;font-size:18px;letter-spacing:.13em;margin:0;color:#26372f}
  #btl-desktop-nav .desktop-brand strong::after{content:"";display:block;width:124px;height:2px;margin-top:8px;background:#8e1f2f}
  #btl-desktop-nav .desktop-brand small{margin-top:8px;color:rgba(38,55,47,.78);font-size:8px;font-weight:900;letter-spacing:.13em}
}
