/* Cloud Design v1.3.15 — menu + brand polish
   Keeps v1.3.14 mobile page rebuild intact. Only navigation/brand are changed. */

/* ---------- Shared brand cleanup ---------- */
.workspace-brand-strip-v1315{display:block}
.workspace-drawer .workspace-brand-home-v1315{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;transform:none!important;text-decoration:none!important;
}
.workspace-brand-lockup-v1315{display:block;width:min(188px,100%);height:auto;max-height:30px;object-fit:contain;object-position:left center}
.workspace-brand-home-v1315:hover{opacity:1!important;transform:none!important;background:transparent!important}
.workspace-site-link-v1315{display:none!important}

/* ---------- Desktop: a real brand header instead of a mini card ---------- */
@media (min-width:901px){
  .dashboard-shell .workspace-nav.workspace-drawer-v1315{padding-top:10px!important}
  .workspace-drawer-v1315 .workspace-brand-strip-v1315{
    display:flex!important;align-items:center!important;min-height:48px!important;
    margin:0 2px 11px!important;padding:2px 5px 12px!important;
    border-bottom:1px solid rgba(255,255,255,.065)!important;
  }
  .workspace-drawer-v1315 .workspace-brand-home-v1315{opacity:.96!important}
  .workspace-drawer-v1315 .workspace-brand-home-v1315:hover{opacity:1!important}
  .workspace-drawer-v1315 .workspace-brand-lockup-v1315{width:min(184px,100%)!important;max-height:29px!important}

  /* New project no longer looks like a giant promo banner. */
  .dashboard-shell .workspace-drawer-v1315 .workspace-primary-action-v1315{
    display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;
    min-height:44px!important;height:auto!important;margin:0 0 14px!important;padding:7px 10px!important;
    border:1px solid rgba(150,115,255,.16)!important;border-radius:13px!important;
    background:linear-gradient(180deg,rgba(126,87,241,.12),rgba(126,87,241,.055))!important;
    box-shadow:none!important;color:var(--text)!important;font-size:.82rem!important;font-weight:720!important;
  }
  .dashboard-shell .workspace-drawer-v1315 .workspace-primary-action-v1315:hover{
    border-color:rgba(161,128,255,.28)!important;background:linear-gradient(180deg,rgba(126,87,241,.17),rgba(126,87,241,.08))!important;
    transform:none!important;
  }
  .workspace-drawer-v1315 .workspace-primary-icon{
    display:grid!important;place-items:center!important;width:28px!important;height:28px!important;flex:0 0 28px!important;
    margin:0!important;border-radius:9px!important;background:rgba(145,109,255,.13)!important;color:#cbbcff!important;
    font-size:1rem!important;line-height:1!important;
  }
}

/* ---------- Mobile: compact top bar ---------- */
@media (max-width:900px){
  .staff-mobile-appbar-v1315{
    height:calc(56px + env(safe-area-inset-top,0px))!important;
    padding:calc(6px + env(safe-area-inset-top,0px)) 10px 6px!important;gap:8px!important;
  }
  .staff-mobile-brand-v1315{
    display:grid!important;place-items:center!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;
    flex:0 0 38px!important;padding:2px!important;border:0!important;border-radius:11px!important;
    background:transparent!important;box-shadow:none!important;
  }
  .staff-mobile-brand-v1315 .staff-mobile-brand-mark{
    display:grid!important;place-items:center!important;width:34px!important;height:34px!important;flex:0 0 34px!important;
    border:0!important;border-radius:0!important;background:transparent!important;overflow:visible!important;
  }
  .staff-mobile-brand-v1315 .staff-mobile-brand-mark img{display:block!important;width:34px!important;height:34px!important;object-fit:contain!important}
  .staff-mobile-section{font-size:.84rem!important;font-weight:760!important;letter-spacing:-.018em!important}
  .staff-mobile-icon-action,.staff-mobile-profile-action{width:38px!important;height:38px!important;border-radius:12px!important}

  /* Bottom sheet: bring back the useful two-column launchpad from v1.3.13, but clean it up. */
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1315,
  body.cd-mobile-rebuild-1314 .workspace-nav.workspace-drawer-v1315{
    display:block!important;position:fixed!important;left:0!important;right:0!important;top:auto!important;bottom:0!important;z-index:5102!important;
    width:100%!important;max-width:none!important;height:min(82dvh,700px)!important;max-height:calc(100dvh - 10px)!important;
    margin:0!important;padding:0 12px calc(18px + env(safe-area-inset-bottom,0px))!important;
    border:0!important;border-top:1px solid rgba(255,255,255,.085)!important;border-radius:24px 24px 0 0!important;
    background:linear-gradient(180deg,#121622 0%,#0a0d15 100%)!important;
    box-shadow:0 -28px 70px rgba(0,0,0,.54)!important;overflow-y:auto!important;overflow-x:hidden!important;
    overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;
    transform:translate3d(0,105%,0)!important;transition:transform .24s cubic-bezier(.2,.8,.2,1)!important;
  }
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1315.is-open,
  body.cd-mobile-rebuild-1314 .workspace-nav.workspace-drawer-v1315.is-open{transform:translate3d(0,0,0)!important}

  /* Brand is already in the top appbar. Do not repeat it inside Menu. */
  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-brand-strip-v1315{display:none!important}
  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-primary-nav{display:none!important}

  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-drawer-head,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 .workspace-drawer-head{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:9px!important;
    position:sticky!important;top:0!important;z-index:6!important;margin:0 -12px 7px!important;
    padding:17px 12px 9px!important;background:linear-gradient(180deg,#121622 82%,rgba(18,22,34,0))!important;
  }
  .workspace-drawer-v1315 .workspace-sheet-handle{display:block!important;position:absolute!important;top:6px!important;left:50%!important;width:38px!important;height:4px!important;transform:translateX(-50%)!important;border-radius:99px!important;background:rgba(255,255,255,.18)!important}
  .workspace-drawer-v1315 .workspace-drawer-user{display:flex!important;align-items:center!important;gap:9px!important;min-width:0!important}
  .workspace-drawer-v1315 .workspace-drawer-avatar{
    display:grid!important;place-items:center!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;flex:0 0 38px!important;
    padding:0!important;border-radius:12px!important;overflow:hidden!important;background:linear-gradient(135deg,rgba(126,87,241,.24),rgba(126,87,241,.07))!important;
    border:1px solid rgba(150,116,255,.14)!important;color:#fff!important;text-decoration:none!important;font-weight:800!important;
  }
  .workspace-drawer-v1315 .workspace-drawer-avatar img{display:block!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;object-fit:cover!important;border-radius:12px!important}
  .workspace-drawer-v1315 .workspace-drawer-user-copy{min-width:0!important}
  .workspace-drawer-v1315 .workspace-drawer-user-copy strong,.workspace-drawer-v1315 .workspace-drawer-user-copy span{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  .workspace-drawer-v1315 .workspace-drawer-user-copy strong{font-size:.82rem!important;line-height:1.15!important}
  .workspace-drawer-v1315 .workspace-drawer-user-copy span{margin-top:2px!important;color:#878ea1!important;font-size:.64rem!important;line-height:1.15!important}
  .workspace-drawer-v1315 .workspace-drawer-close{display:grid!important;place-items:center!important;width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;border-radius:11px!important;border:1px solid rgba(255,255,255,.075)!important;background:rgba(255,255,255,.035)!important;color:#d8dbe5!important;font-size:1.15rem!important}

  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-primary-action-v1315,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 .workspace-primary-action-v1315{
    display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;width:100%!important;
    min-height:46px!important;height:46px!important;margin:3px 0 11px!important;padding:6px 10px!important;
    border:1px solid rgba(157,120,255,.18)!important;border-radius:13px!important;
    background:linear-gradient(135deg,rgba(116,78,226,.94),rgba(145,98,244,.94))!important;color:#fff!important;
    box-shadow:0 10px 26px rgba(103,68,210,.17)!important;font-size:.8rem!important;font-weight:760!important;
  }
  .workspace-drawer-v1315 .workspace-primary-action-v1315 .workspace-primary-icon{font-size:1rem!important;color:#fff!important;background:transparent!important;width:auto!important;height:auto!important;flex:0 0 auto!important}

  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-nav-section,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 .workspace-nav-section{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;
    margin:0 0 9px!important;padding:0 0 10px!important;border-bottom:1px solid rgba(255,255,255,.05)!important;
  }
  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-nav-section:last-child{border-bottom:0!important;margin-bottom:0!important}
  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-nav-section>.nav-label,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 .workspace-nav-section>.nav-label{
    grid-column:1/-1!important;margin:5px 4px 1px!important;padding:0!important;color:#757d90!important;
    font-size:.57rem!important;line-height:1.2!important;font-weight:680!important;letter-spacing:.12em!important;text-transform:uppercase!important;
  }

  body.has-mobile-workspace .workspace-drawer-v1315 a.workspace-menu-item,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 a.workspace-menu-item,
  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-drawer-logout button,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 .workspace-drawer-logout button{
    display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;width:100%!important;min-width:0!important;
    min-height:56px!important;height:auto!important;margin:0!important;padding:8px 9px!important;
    border:1px solid rgba(255,255,255,.055)!important;border-radius:14px!important;
    background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.018))!important;
    color:#daddE7!important;text-align:left!important;text-decoration:none!important;font-size:.75rem!important;
    box-shadow:0 1px 0 rgba(255,255,255,.018) inset!important;
  }
  body.has-mobile-workspace .workspace-drawer-v1315 a.workspace-menu-item:active{transform:scale(.985)!important;background:rgba(132,92,244,.09)!important}
  body.has-mobile-workspace .workspace-drawer-v1315 a.workspace-menu-item.is-active,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 a.workspace-menu-item.is-active{
    border-color:rgba(153,118,255,.17)!important;background:linear-gradient(180deg,rgba(132,92,244,.13),rgba(132,92,244,.055))!important;color:#f0ebff!important;
  }
  .workspace-drawer-v1315 .workspace-nav-icon{
    display:grid!important;place-items:center!important;width:30px!important;min-width:30px!important;height:30px!important;flex:0 0 30px!important;
    border-radius:9px!important;background:rgba(255,255,255,.04)!important;color:#aeb4c5!important;
  }
  .workspace-drawer-v1315 .workspace-nav-icon svg{width:17px!important;height:17px!important}
  .workspace-drawer-v1315 .workspace-nav-text{min-width:0!important;font-size:.75rem!important;line-height:1.2!important;font-weight:590!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .workspace-drawer-v1315 .nav-count-badge{margin-left:auto!important}

  .workspace-drawer-v1315 .workspace-wide-tile-v1315{grid-column:1/-1!important;min-height:50px!important}
  .workspace-drawer-v1315 .workspace-site-link-v1315{display:flex!important}
  .workspace-drawer-v1315 .workspace-drawer-logout{grid-column:1/-1!important;width:100%!important;margin:0!important}
  .workspace-drawer-v1315 .workspace-drawer-logout button{
    justify-content:center!important;min-height:44px!important;background:rgba(255,92,116,.035)!important;border-color:rgba(255,110,132,.09)!important;color:#ff9baa!important;
  }

  /* Keep the compact v1.3.14 bottom navigation. Only polish its selected More state. */
  body.cd-mobile-rebuild-1314 .mobile-admin-bottom-nav>button[aria-expanded="true"],
  body.has-mobile-workspace .mobile-admin-bottom-nav>button[aria-expanded="true"]{
    color:#e8e0ff!important;background:linear-gradient(180deg,rgba(132,92,244,.18),rgba(132,92,244,.075))!important;
  }
}

@media (max-width:370px){
  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-nav-section,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 .workspace-nav-section{grid-template-columns:1fr!important}
  body.has-mobile-workspace .workspace-drawer-v1315 .workspace-nav-section>.nav-label,
  body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 .workspace-nav-section>.nav-label,
  .workspace-drawer-v1315 .workspace-wide-tile-v1315,
  .workspace-drawer-v1315 .workspace-drawer-logout{grid-column:1!important}
}

/* ---------- Light theme ---------- */
html[data-theme="light"] .workspace-drawer-v1315 .workspace-brand-strip-v1315{border-bottom-color:rgba(31,35,54,.08)!important}
@media (max-width:900px){
  html[data-theme="light"] body.has-mobile-workspace .workspace-nav.workspace-drawer-v1315,
  html[data-theme="light"] body.cd-mobile-rebuild-1314 .workspace-nav.workspace-drawer-v1315{
    background:linear-gradient(180deg,#ffffff,#f5f7fb)!important;border-top-color:rgba(31,35,54,.09)!important;box-shadow:0 -24px 60px rgba(35,42,64,.18)!important;
  }
  html[data-theme="light"] .workspace-drawer-v1315 .workspace-drawer-head{background:linear-gradient(180deg,#fff 82%,rgba(255,255,255,0))!important}
  html[data-theme="light"] body.has-mobile-workspace .workspace-drawer-v1315 a.workspace-menu-item,
  html[data-theme="light"] body.cd-mobile-rebuild-1314 .workspace-drawer-v1315 a.workspace-menu-item{
    background:linear-gradient(180deg,#fff,#f8f9fc)!important;border-color:rgba(31,35,54,.08)!important;color:#242937!important;box-shadow:0 4px 14px rgba(38,46,70,.045)!important;
  }
  html[data-theme="light"] .workspace-drawer-v1315 .workspace-nav-icon{background:#f0f2f7!important;color:#697085!important}
  html[data-theme="light"] .workspace-drawer-v1315 .workspace-drawer-user-copy span,
  html[data-theme="light"] .workspace-drawer-v1315 .workspace-nav-section>.nav-label{color:#858c9c!important}
}
