/* Two separate screens inside a fixed app shell. Only their content scrolls. */
html{height:100%;overflow:hidden;overscroll-behavior:none;scroll-behavior:auto}
body.app-shell{height:100vh;height:100dvh;min-height:0;overflow:hidden;overscroll-behavior:none;display:flex;flex-direction:column;padding:0;width:100%}
.app-shell .topbar{width:100%;max-width:1440px;min-height:64px;height:64px;flex:0 0 auto;margin:0 auto;padding:0 28px}
.app-shell .brand img{width:36px;height:36px}
.app-shell #main{display:flex;flex:1;min-height:0;overflow:hidden;width:100%}
.app-shell .content-wrap{width:100%;max-width:1440px;margin:0 auto;padding:0 24px 18px;min-height:0;display:flex;flex:1;overflow:hidden}
.app-shell .organization{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;padding:0}
.app-shell .section-heading{flex-shrink:0;margin:0 0 12px;min-height:38px}
.app-shell .section-heading .eyebrow{display:none}
.app-shell .section-heading h2{font-size:25px;margin:0}
.app-shell .role-tabs{flex-shrink:0;margin:0 0 12px;gap:10px}
.app-shell .role-tab{min-height:62px;padding:10px 16px;gap:10px}
.app-shell .role-icon{width:34px;height:34px;border-radius:9px}
.app-shell .role-icon .icon{width:19px;height:19px}
.app-shell .role-label small{display:none}
.app-shell .role-count{font-size:24px}
.app-shell .area-navigation{flex-shrink:0;margin:0 0 12px;padding:8px 12px;display:flex;align-items:center;gap:14px;min-width:0}
.app-shell .area-heading{margin:0;flex-shrink:0;gap:10px}
.app-shell .area-heading small{display:none}
.app-shell .area-row{flex:1;min-width:0}
.app-shell .area-tabs{padding:0;overscroll-behavior:none;scrollbar-width:none;touch-action:pan-x}
.app-shell .area-tabs::-webkit-scrollbar{display:none}
.app-shell .area-hint{display:none}
.app-shell .chart-panel{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0;overflow:hidden}
.app-shell .chart-toolbar{flex-shrink:0;padding:12px 16px}
.app-shell .chart-scroll{flex:1;min-height:0;max-height:none;overscroll-behavior:none;overflow:auto;overflow-anchor:none;touch-action:pan-x pan-y;scroll-behavior:auto;-webkit-overflow-scrolling:touch;-webkit-user-select:none;user-select:none}
.app-shell .chart-scroll img{-webkit-user-drag:none;pointer-events:none}
.app-shell .chart{padding:18px 18px 24px}
.app-shell .search-status{flex-shrink:0;padding:8px 14px}
.app-shell .chart-bottom{flex-shrink:0;min-height:42px;padding:4px 14px}
.app-shell .chart-bottom .zoom-controls button{min-height:34px;min-width:34px}
.app-shell .news-section{width:100%;min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none;padding:8px 2px 24px;touch-action:pan-y}
.app-shell .news-section>.section-heading{padding:0 4px;margin-bottom:22px}
.app-shell .news-feed{padding:0 4px}
.app-shell .search-results{width:min(900px,calc(100vw - 100px))}
.app-shell .group-root{min-height:46px;padding:10px 18px}
.app-shell .tree{padding-top:20px}
.app-shell .tree:before{height:20px}
.app-shell .tree>li{padding-top:18px}
.app-shell .tree>li:before,.app-shell .tree>li:after{height:18px}
.app-shell .tree.team-members>li{padding-top:0}
.app-shell .tree.team-members>li:before{height:100%}
.app-shell .tree.team-members>li:after{height:0}
.app-shell .tree.team-members>li:last-child:before{height:35px}
.app-shell .tree.team-members:before{height:20px}
@media(max-width:640px){
  .app-shell .topbar{height:54px;min-height:54px;padding:0 12px;gap:12px}
  .app-shell .brand{gap:8px}.app-shell .brand img{width:31px;height:31px}
  .app-shell .brand>span{font-size:15px;letter-spacing:1.3px}.app-shell .brand small{display:none}
  .app-shell .topbar .btn{min-height:34px;font-size:11px;padding:7px 10px}
  .app-shell .content-wrap{padding:0 8px 7px;margin:0;width:100%}
  .app-shell .section-heading{min-height:30px;margin-bottom:7px;gap:8px}
  .app-shell .section-heading h2{font-size:20px}.app-shell .total-pill{padding:5px 8px;font-size:9px}
  .app-shell .role-tabs{gap:6px;margin-bottom:7px}
  .app-shell .role-tab{min-height:42px;padding:7px 9px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;text-align:left;border-radius:9px}
  .app-shell .role-icon{display:none}.app-shell .role-label{font-size:12px;white-space:nowrap}
  .app-shell .role-count{font-family:inherit;font-size:11px;margin:0;padding:2px 5px;background:#e9dfd2;border-radius:6px;line-height:1.6}
  .app-shell .role-count:after{display:none}.app-shell .tab-arrow{display:none}
  .app-shell .area-navigation{flex-direction:column;align-items:stretch;gap:5px;padding:6px 8px;margin-bottom:7px;border-radius:9px}
  .app-shell .area-heading{justify-content:space-between;min-height:24px}
  .app-shell .area-heading>span{font-size:10px;gap:5px}.app-shell .area-heading .icon{width:14px;height:14px}
  .app-shell .area-heading .btn{min-height:26px;padding:4px 8px;font-size:10px}
  .app-shell .area-tab{min-height:32px;font-size:11px;padding:5px 10px;gap:7px;max-width:170px}
  .app-shell .area-tabs{gap:6px}.app-shell .area-edit{height:32px;width:32px}
  .app-shell .chart-panel{border-radius:10px}
  .app-shell .chart-toolbar{padding:8px;gap:0;display:block}
  .app-shell .chart-title{display:none}.app-shell .chart-actions{width:100%;gap:7px}
  .app-shell .search{flex:1;min-width:0;padding:0 9px}.app-shell .search input{width:100%;min-width:0;font-size:16px;min-height:36px}
  .app-shell .chart-actions>.btn{min-height:36px;padding:8px 10px;font-size:10px;gap:5px}
  .app-shell .chart-actions>.btn .icon{width:14px;height:14px}
  .app-shell .chart{padding:14px 8px 24px}
  .app-shell .chart-bottom{min-height:38px;padding:2px 9px;font-size:9px}
  .app-shell .chart-bottom .zoom-controls button{min-height:32px;min-width:32px}
  .app-shell .group-root{min-width:150px;padding:8px 14px;gap:8px}
  .app-shell .group-root strong{font-size:12px}.app-shell .group-root small{font-size:9px}
  .app-shell .person-card{width:142px;padding:11px 9px}
  .app-shell .slot-type{font-size:9px;margin:0 0 8px;padding:4px 5px}
  .app-shell .structured-person .avatar,.app-shell .person-card .avatar{width:42px;height:46px;margin-bottom:8px;border-radius:8px}
  .app-shell .person-name{font-size:11px}.app-shell .person-meta{font-size:9px;margin-top:4px}.app-shell .person-code{font-size:9px;margin-top:4px}
  .app-shell .person-department{display:none}.app-shell .tree>li{padding-left:6px;padding-right:6px}
  .app-shell .tree.team-members>li{padding-left:12px;padding-right:0;padding-bottom:12px}
  .app-shell .tree.team-members>li:before,.app-shell .tree.team-members>li:after{width:12px}
  .app-shell .tree.team-members:before{left:calc(50% - 71px)}
  .app-shell .add-worker{width:142px;min-height:42px}
  .app-shell .search-results{width:calc(100vw - 38px);gap:8px}
  .app-shell .mobile-nav{position:relative;flex:0 0 auto;min-height:58px;padding:4px 10px calc(4px + env(safe-area-inset-bottom));left:auto;right:auto;bottom:auto}
  .app-shell .mobile-nav a,.app-shell .mobile-nav button{min-height:48px;gap:4px}
  .app-shell .news-section{padding:10px 3px 18px}
  .app-shell .news-section>.section-heading{margin-bottom:18px;min-height:48px;padding:0 3px}
  .app-shell .news-section h2{font-size:24px}.app-shell .news-feed{padding:0 3px}
}
@media(max-height:520px) and (max-width:900px){
  .app-shell .topbar{height:42px;min-height:42px}
  .app-shell .organization>.section-heading{display:none}
  .app-shell .role-tabs{margin-bottom:5px}
  .app-shell .role-tab{min-height:34px;padding:5px 10px}
  .app-shell .area-navigation{padding:4px 7px;flex-direction:row;align-items:center;margin-bottom:5px}
  .app-shell .area-heading>span{display:none}
  .app-shell .chart-toolbar{padding:5px 8px}
  .app-shell .chart-title{display:none}
  .app-shell .chart-actions{width:100%}
  .app-shell .search{flex:1}.app-shell .search input{width:100%}
  .app-shell .mobile-nav{min-height:44px;padding-top:2px;padding-bottom:2px}
  .app-shell .mobile-nav a,.app-shell .mobile-nav button{min-height:38px}
}

/* Keep the requested welcome banner and original illustrated category cards. */
.app-shell .organization.banner-visible{overflow-y:auto;overflow-x:hidden;overscroll-behavior:none;touch-action:pan-y;scrollbar-width:thin;padding-right:3px}
.app-shell .organization.banner-visible .chart-panel{flex:0 0 auto;height:clamp(360px,65dvh,680px);min-height:360px;margin-bottom:10px}
.app-shell .hero{flex:0 0 auto;width:100%;max-width:none;margin:0 0 24px;min-height:250px;padding:30px 36px;overflow:clip}
.app-shell .hero .hero-link{background:transparent;color:inherit;padding:0 0 7px;text-align:left;border-bottom:1px solid #b8997f;border-radius:0}
.app-shell .hero-art{pointer-events:none}
.app-shell .banner-close{position:absolute;right:12px;top:10px;z-index:2;background:#ffffff0e;border:1px solid #ffffff20;border-radius:50%;width:30px;height:30px;color:#dbc1a6;display:grid;place-items:center}
.app-shell .banner-close .icon{width:16px;height:16px;transform:rotate(-90deg)}
.app-shell .heading-actions{display:flex;align-items:center;gap:8px}
.app-shell .show-banner{background:transparent;border:1px solid #ded0bf;border-radius:7px;color:#8a6b4e;min-height:30px;padding:4px 8px;font-size:10px}
.app-shell .banner-visible>.section-heading{margin-bottom:20px;min-height:46px}
.app-shell .banner-visible>.section-heading .eyebrow{display:block;margin-bottom:8px}
.app-shell .role-tabs{gap:16px;margin-bottom:18px}
.app-shell .role-tab{min-height:98px;padding:18px 22px;gap:13px;border-radius:13px}
.app-shell .role-icon{display:grid;width:44px;height:44px;border-radius:13px}
.app-shell .role-icon .icon{width:23px;height:23px}
.app-shell .role-label{font-size:15px}
.app-shell .role-label small{display:block}
.app-shell .role-count{font-family:Georgia,serif;font-size:29px;font-weight:400;margin-left:auto;padding-right:6px;background:none}
.app-shell .tab-arrow{display:block}
@media(max-width:640px){
  .app-shell .topbar{height:68px;min-height:68px;padding:0 16px}
  .app-shell .brand img{width:36px;height:36px}.app-shell .brand{gap:9px}
  .app-shell .brand>span{font-size:14px;letter-spacing:1.6px}.app-shell .brand small{display:block;font-size:7px;letter-spacing:1.6px;margin-top:4px}
  .app-shell .content-wrap{padding:0 12px 7px}
  .app-shell .organization.banner-visible{padding-right:0;scrollbar-width:none}
  .app-shell .organization.banner-visible::-webkit-scrollbar{display:none}
  .app-shell .hero{min-height:240px;margin:0 0 24px;padding:26px 22px;border-radius:16px;display:block}
  .app-shell .hero h1{font-size:clamp(25px,7.3vw,31px);line-height:1.34;letter-spacing:-.7px;margin:15px 0 12px}
  .app-shell .hero p{font-size:10px;margin-bottom:22px}
  .app-shell .hero .eyebrow{font-size:8px;letter-spacing:1.5px}
  .app-shell .hero .hero-link{font-size:11px;gap:12px}
  .app-shell .hero-art{position:absolute;right:-74px;bottom:-30px;width:230px;height:230px;opacity:.12}
  .app-shell .hero-art>svg{width:220px}
  .app-shell .banner-visible>.section-heading{margin-bottom:18px;min-height:47px}
  .app-shell .banner-visible>.section-heading h2{font-size:25px}
  .app-shell .banner-visible>.section-heading .eyebrow{font-size:8px;letter-spacing:1.4px;margin-bottom:7px}
  .app-shell .role-tabs{gap:9px;margin-bottom:15px}
  .app-shell .role-tab{flex-direction:column;min-height:114px;gap:9px;padding:15px 8px 12px;justify-content:center;text-align:center;border-radius:11px}
  .app-shell .role-icon{display:grid;width:34px;height:34px;border-radius:10px}
  .app-shell .role-icon .icon{width:19px;height:19px}
  .app-shell .role-label{font-size:12px;line-height:1.4;white-space:nowrap}
  .app-shell .role-label small{display:none}
  .app-shell .role-count{font-family:inherit;font-size:10px;color:#99846d;line-height:1;margin:0;padding:0;border-radius:0;background:none}
  .app-shell .role-count:after{display:inline;content:' người'}
  .app-shell .tab-arrow{display:block}
  .app-shell .area-navigation{margin-bottom:12px;padding:10px 11px;gap:9px;border-radius:12px}
  .app-shell .area-tab{min-height:36px;padding:7px 10px}
  .app-shell .area-edit{height:36px;width:36px}
  .app-shell .search-results{width:calc(100vw - 46px)}
  .app-shell .heading-actions{gap:5px}.app-shell .show-banner{font-size:9px;padding:4px 5px}
}
@media(max-height:700px) and (max-width:900px){
  .app-shell .organization{overflow-y:auto;overflow-x:hidden;overscroll-behavior:none;touch-action:pan-y;scrollbar-width:none}
  .app-shell .organization::-webkit-scrollbar{display:none}
  .app-shell .organization:not(.banner-visible) .chart-panel{flex:0 0 auto;height:65dvh;min-height:320px;margin-bottom:10px}
  .app-shell .organization>.section-heading{display:flex}
}
