/* Adaptive left navigation + Bento workspace — v0.10.0 */
:root{--dt-sidebar:210px;--dt-top:64px}
html,body,#app{min-height:100%;margin:0}
body{overflow-x:hidden}
.bento-shell{min-height:100vh;display:grid;grid-template-columns:var(--dt-sidebar) minmax(0,1fr);background:var(--v6-bg,#0b0f19);isolation:isolate}
.bento-shell:before,.bento-shell:after{content:"";position:fixed;z-index:-1;border-radius:50%;pointer-events:none;filter:blur(90px)}
.bento-shell:before{width:360px;height:360px;right:-110px;top:-130px;background:rgba(139,92,246,.2)}
.bento-shell:after{width:320px;height:320px;left:15%;bottom:-180px;background:rgba(34,211,238,.1)}
.app-sidebar{position:sticky;top:0;height:100vh;min-height:560px;z-index:20;display:flex;flex-direction:column;padding:18px 12px;background:rgba(7,11,20,.88);border-right:1px solid rgba(255,255,255,.08);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px)}
.sidebar-brand{height:46px;display:flex;align-items:center;gap:10px;padding:0 8px;margin-bottom:22px;min-width:0}
.brand-mark{width:34px;height:34px;min-width:34px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(145deg,#9f7aea,#6d3cf6);color:#fff;font-size:11px;font-weight:800;box-shadow:0 9px 26px rgba(139,92,246,.28)}
.brand-copy,.user-copy{display:grid;min-width:0}.brand-copy strong{font-size:14px;line-height:1.25;white-space:nowrap}.brand-copy small,.user-copy small{color:#94a3b8;font-size:9px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desktop-nav{display:grid;align-content:start;gap:5px;padding:0;background:transparent;border:0;overflow:visible}
.desktop-nav button,.sidebar-logout{width:100%;min-height:42px;border:0;border-radius:12px;padding:0 11px;display:flex;align-items:center;gap:11px;background:transparent;color:#94a3b8;font-size:12px;font-weight:650;text-align:left;cursor:pointer;transition:background .16s,color .16s,transform .16s}
.desktop-nav button:hover,.sidebar-logout:hover{background:rgba(255,255,255,.055);color:#e2e8f0;transform:none}
.desktop-nav button.active{background:linear-gradient(90deg,rgba(139,92,246,.24),rgba(139,92,246,.07));color:#fff;box-shadow:inset 3px 0 #8b5cf6}
.nav-icon{width:20px;min-width:20px;text-align:center;font-size:15px;line-height:1}.nav-label{white-space:nowrap}
.sidebar-user{margin-top:auto;min-height:58px;padding:9px;display:grid;grid-template-columns:34px minmax(0,1fr);gap:9px;align-items:center;border:1px solid rgba(255,255,255,.07);border-radius:14px;background:rgba(255,255,255,.04)}
.user-avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#243047;color:#fff;font-size:10px;font-weight:800}.user-copy strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-logout{margin-top:7px}
.app-workspace{min-width:0;display:grid;grid-template-rows:var(--dt-top) minmax(0,1fr)}
.bento-shell .top{position:sticky;top:0;z-index:15;height:var(--dt-top);padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:rgba(11,15,25,.72);border-bottom:1px solid rgba(255,255,255,.075);box-shadow:none;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.top-context{display:grid;min-width:0}.top-context strong{font-size:14px;line-height:1.2}.top-context small{margin-top:3px;color:#94a3b8;font-size:10px}.bento-shell .top-actions{display:flex;align-items:center;gap:8px}.bento-shell .sync{max-width:210px;min-height:30px;display:inline-flex;align-items:center;justify-content:center;padding:5px 10px;font-size:10px;line-height:1.2;border-radius:999px;white-space:nowrap}.bento-shell #theme-toggle{width:32px;height:32px;min-width:32px}
.bento-shell .page{width:min(1240px,100%);max-width:1240px;min-width:0;margin:0 auto;padding:24px 24px 54px}
.mobile-nav{display:none}

/* Bento proportions and compact component rhythm */
.bento-shell .dash-head{margin:2px 0 18px}.bento-shell .dash-head h1{font-size:clamp(25px,3vw,34px)}
.bento-shell .bento{grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}
.bento-shell .metric{grid-column:span 3;min-height:126px;padding:16px;border-radius:18px}
.bento-shell .metric strong{font-size:31px}.bento-shell .metric-icon{top:14px;left:15px;width:29px;height:29px}
.bento-shell .workload-panel{grid-column:span 7}.bento-shell .status-panel{grid-column:span 5}.bento-shell .risk-panel{grid-column:span 4}.bento-shell .briefing-panel{grid-column:span 8}
.bento-shell .glass{border-radius:18px;padding:16px;background:rgba(255,255,255,.045);border-color:rgba(255,255,255,.085);box-shadow:0 16px 46px rgba(0,0,0,.14)}
.bento-shell .panel-title{margin-bottom:13px}.bento-shell .brief-row{min-height:52px}.bento-shell .workload-list{gap:12px}
.bento-shell .toolbar{margin-bottom:13px}.bento-shell .toolbar h1,.bento-shell .page>h1{font-size:22px}
.bento-shell .filters{border-radius:16px;padding:12px}.bento-shell .customer-list{gap:9px}.bento-shell .customer-group{border-radius:16px}
.bento-shell .customer-group summary{min-height:58px}.bento-shell .customer-jobs{gap:9px}.bento-shell .card{border-radius:16px}
.bento-shell .form-card{margin-top:8px}.bento-shell .detail-section{border-radius:17px}

[data-theme="light"] .bento-shell{background:#eef2f8;color:#172033}
[data-theme="light"] .bento-shell:before{background:rgba(139,92,246,.13)}[data-theme="light"] .bento-shell:after{background:rgba(34,211,238,.08)}
[data-theme="light"] .app-sidebar{background:rgba(247,249,253,.88);border-color:rgba(30,41,59,.1)}
[data-theme="light"] .desktop-nav button,[data-theme="light"] .sidebar-logout{color:#64748b}[data-theme="light"] .desktop-nav button:hover{color:#27324a;background:rgba(99,91,255,.06)}
[data-theme="light"] .desktop-nav button.active{color:#4c3ecb;background:linear-gradient(90deg,rgba(139,92,246,.16),rgba(139,92,246,.045))}
[data-theme="light"] .sidebar-user{background:rgba(255,255,255,.72);border-color:#dce2ec}[data-theme="light"] .user-avatar{background:#e8e7ff;color:#4c3ecb}
[data-theme="light"] .bento-shell .top{background:rgba(247,249,253,.76);border-color:rgba(30,41,59,.09)}
[data-theme="light"] .bento-shell .glass{background:rgba(255,255,255,.72);border-color:rgba(30,41,59,.09);box-shadow:0 16px 42px rgba(36,48,76,.08)}

@media(max-width:980px){
  :root{--dt-sidebar:72px}
  .app-sidebar{padding-inline:9px;align-items:center}.sidebar-brand{padding:0}.brand-copy,.user-copy,.desktop-nav .nav-label,.sidebar-logout .nav-label{display:none}
  .desktop-nav{width:100%}.desktop-nav button,.sidebar-logout{width:44px;padding:0;justify-content:center}.desktop-nav button.active{box-shadow:inset 0 0 0 1px rgba(139,92,246,.28)}
  .sidebar-user{grid-template-columns:34px;padding:5px}.bento-shell .page{padding:20px 18px 46px}
  .bento-shell .metric{grid-column:span 6}.bento-shell .workload-panel,.bento-shell .status-panel,.bento-shell .risk-panel,.bento-shell .briefing-panel{grid-column:span 12}
  .bento-shell .risk-list{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media(max-width:640px){
  html,body{width:100%;height:100%;overflow:hidden;background:#080c15}
  .bento-shell{position:relative;width:min(100%,430px);height:100dvh;min-height:0;margin:0 auto;display:block;padding-bottom:62px;overflow:hidden;border-inline:1px solid rgba(255,255,255,.07);box-shadow:0 0 54px rgba(0,0,0,.35)}
  .app-sidebar{display:none}.app-workspace{height:100%;display:grid;grid-template-rows:56px minmax(0,1fr)}
  .bento-shell .top{height:56px;padding:0 11px}.top-context strong{font-size:13px}.top-context small{font-size:9px}.bento-shell .sync{max-width:112px;font-size:9px;padding:4px 7px;white-space:normal;text-align:center}.bento-shell #theme-toggle{width:29px;height:29px;min-width:29px}
  .bento-shell .page{width:100%;height:100%;max-width:none;padding:12px 10px 24px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin}
  .mobile-nav{position:absolute;z-index:30;left:7px;right:7px;bottom:7px;height:52px;display:flex;align-items:stretch;gap:2px;padding:4px;overflow-x:auto;overflow-y:hidden;border:1px solid rgba(255,255,255,.09);border-radius:16px;background:rgba(15,20,32,.94);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);scrollbar-width:none}.mobile-nav::-webkit-scrollbar{display:none}
  .mobile-nav button{flex:1 0 57px;min-width:57px;border:0;border-radius:11px;padding:5px 3px;display:grid;justify-items:center;align-content:center;gap:3px;background:transparent;color:#94a3b8;font-size:8.5px;font-weight:700;line-height:1;cursor:pointer}.mobile-nav button.active{background:rgba(139,92,246,.19);color:#c4b5fd}.mobile-nav .nav-icon{width:auto;font-size:13px}.mobile-nav .nav-label{max-width:55px;overflow:hidden;text-overflow:ellipsis}
  .bento-shell .dash-head{align-items:flex-start;margin-bottom:12px}.bento-shell .dash-head h1{font-size:23px}.bento-shell .dash-head p{font-size:11px}.bento-shell .date-control{width:100%}
  .bento-shell .bento{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.bento-shell .metric{grid-column:span 1;min-height:104px;padding:11px;border-radius:15px}.bento-shell .metric strong{font-size:26px}.bento-shell .metric-icon{top:10px;left:11px;width:26px;height:26px}
  .bento-shell .workload-panel,.bento-shell .status-panel,.bento-shell .risk-panel,.bento-shell .briefing-panel{grid-column:span 2}
  .bento-shell .glass{padding:11px;border-radius:15px}.bento-shell .risk-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bento-shell .toolbar h1,.bento-shell .page>h1{font-size:19px}.bento-shell .compact-subtitle{font-size:10px}
  .bento-shell .filters{padding:9px;border-radius:14px}.bento-shell .customer-group{border-radius:14px}.bento-shell .card,.bento-shell .form-card{border-radius:14px}
  [data-theme="light"] .mobile-nav{background:rgba(248,250,255,.94);border-color:rgba(30,41,59,.1)}
}

@media(max-width:360px){
  .bento-shell .page{padding-inline:8px}.mobile-nav{left:5px;right:5px;bottom:5px}.mobile-nav button{flex-basis:53px;min-width:53px}.bento-shell .sync{max-width:92px}.bento-shell .glass{padding:10px}
}
