/* DAI SON SOURCE CENTER / PHASE 2: productivity workspaces
   Preserve application structure and business logic. One outer viewport,
   independent scrolling lists, bigger imagery, tight operational density. */
:root{--work-divider:#e5eaf1;--work-blue:#245fd5}
body.ds-app .workspace:has(> #desk:not(.hidden)),
body.ds-app .workspace:has(> #ops:not(.hidden)),
body.ds-app .workspace:has(> #admin:not(.hidden)){
  padding:10px 12px 10px;
  max-width:none;
  height:calc(100dvh - 62px);
  min-height:0;overflow:hidden;
}
body.ds-app #desk,body.ds-app #ops,body.ds-app #admin{
  height:100%;min-height:0!important;padding:0!important;
  display:block;
}
body.ds-app #desk.hidden,body.ds-app #ops.hidden,body.ds-app #admin.hidden{display:none!important}
body.ds-app #desk iframe,body.ds-app #ops iframe,body.ds-app #admin iframe{
  display:block;width:100%;height:100%!important;min-height:0!important;
  border:1px solid var(--ds-border)!important;border-radius:10px;
  background:var(--ds-page);
}
/* Embedded pages visually join the shared nav/topbar without duplicating their heading. */
body.ds-desk .desk{height:100dvh;min-height:540px;padding:10px 12px;gap:8px;overflow:hidden}
body.ds-desk .top{justify-content:space-between;min-height:37px;height:37px;gap:8px}
body.ds-desk .top>div:first-child{display:none}
body.ds-desk .top-actions{width:100%;gap:6px;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
body.ds-desk .top-actions button{flex:none;padding:7px 12px;min-height:34px}
body.ds-desk .top-actions button:last-child{margin-left:auto}
body.ds-desk .kpis{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
body.ds-desk .kpi{padding:7px 10px;min-height:55px;border-color:var(--work-divider)}
body.ds-desk .kpi b{font-size:18px;line-height:1.15;letter-spacing:-.4px;color:#213550}
body.ds-desk .kpi span{font-size:10px;line-height:1.4}
body.ds-desk .columns{
  display:grid;grid-template-columns:minmax(232px,27%) minmax(300px,1fr) minmax(240px,28%);
  min-height:0;flex:1;gap:8px;
}
body.ds-desk .panel{min-height:0;overflow:hidden;box-shadow:none}
body.ds-desk .panel-head{padding:9px 12px;min-height:42px;flex:0 0 auto}
body.ds-desk .panel-head strong{font-size:12.5px}
body.ds-desk .panel-body{padding:10px;overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin}
body.ds-desk .filters{
  grid-template-columns:minmax(120px,1fr) minmax(110px,45%);
  padding:7px;gap:6px;
}
body.ds-desk .filters input,body.ds-desk .filters select{height:34px;padding:6px 8px;font-size:11.5px}
body.ds-desk #listBody{padding:4px 5px}
body.ds-desk .item{padding:9px 7px;gap:9px;min-height:70px}
body.ds-desk .item .thumb{width:74px;height:64px;object-fit:cover;border:1px solid #e6ebf1}
body.ds-desk .i-title{font-size:12.5px;line-height:1.38;word-break:break-word}
body.ds-desk .i-meta{font-size:10.5px}
body.ds-desk #detailBody .hero-image{
  width:100%;height:clamp(245px,45dvh,520px);max-height:none;
  border-radius:9px;object-fit:contain;background:#f6f8fc;cursor:zoom-in;
}
body.ds-desk .images-strip{gap:8px;padding:8px 0}
body.ds-desk .image-small{width:80px;height:70px}
body.ds-desk .copy{font-size:12.5px;line-height:1.65;max-height:190px}
body.ds-desk .comment p{font-size:12px;line-height:1.55}
body.ds-desk .section-label{margin:11px 0 6px}
body.ds-desk .action-row{position:relative;gap:6px}
body.ds-desk .action-row .btn{min-height:34px}
body.ds-desk .gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.ds-desk .gallery img{height:155px}
body.ds-desk .desk-pager{display:flex;align-items:center;gap:5px}
body.ds-desk .desk-pager button{
  font-size:13px;padding:4px 9px;min-width:31px;min-height:29px;
  border:1px solid var(--ds-border);background:#f8fafc;color:#36516e;
  border-radius:7px;font-weight:720;
}
body.ds-desk .desk-pager button:hover{background:#edf3ff;color:#245fd5}
body.ds-desk .desk-pager .count{max-width:160px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
body.ds-desk .notice{min-height:15px;font-size:10.5px}
/* Supplier: see lists, profile and images simultaneously on normal desktops. */
body.ds-app .workspace:has(> #sup:not(.hidden)){
  max-width:none;padding:13px 18px 24px;
}
body.ds-app #sup>.title{margin-bottom:9px;align-items:center}
body.ds-app #sup>.title h1{font-size:19px;letter-spacing:-.45px}
body.ds-app #sup>.title .muted{font-size:11px}
body.ds-app #sup .supplier-metrics{gap:7px;margin:0 0 9px}
body.ds-app #sup .supplier-metrics .card{padding:8px 11px;border-radius:9px}
body.ds-app #sup .supplier-metrics .metric{font-size:21px;line-height:1.2}
body.ds-app #sup .supplier-metrics .muted{font-size:10px}
body.ds-app #sup .supplier-filters{padding:9px 11px;margin:0 0 10px;border-radius:10px}
body.ds-app #sup .supplier-filter-grid{grid-template-columns:minmax(180px,1.45fr) repeat(4,minmax(105px,1fr));gap:7px}
body.ds-app #sup .supplier-filter-grid .field label{font-size:9.5px;letter-spacing:.35px;margin-bottom:4px}
body.ds-app #sup .supplier-filter-grid input,body.ds-app #sup .supplier-filter-grid select{height:35px;font-size:11.5px;padding:5px 9px}
body.ds-app #sup .supplier-filter-foot{margin-top:6px;font-size:11px}
body.ds-app #sup .supplier-filter-foot .btn{padding:5px 9px;font-size:10.5px}
body.ds-app #sup .supplier-workbench{
  height:max(515px,calc(100dvh - 292px));min-height:515px;max-height:none;
  grid-template-columns:minmax(238px,.92fr) minmax(375px,1.5fr) minmax(225px,.8fr);
  gap:9px;
}
body.ds-app #sup .supplier-directory,
body.ds-app #sup .supplier-focus,
body.ds-app #sup .supplier-insights{border:1px solid var(--ds-border);border-radius:10px;box-shadow:none}
body.ds-app #sup .supplier-table-head{padding:10px 12px 8px}
body.ds-app #sup .supplier-table-head h3{font-size:12.5px}
body.ds-app #sup .supplier-table-head .hint{font-size:10px}
body.ds-app #sup .supplier-selection-bar{padding:6px 10px;gap:5px}
body.ds-app #sup .supplier-selection-actions .btn{padding:6px 8px;font-size:10px}
body.ds-app #sup .supplier-cards{gap:5px;padding:6px}
body.ds-app #sup .supplier-card{padding:8px 9px;border-radius:8px}
body.ds-app #sup .sup-card-avatar{width:30px;height:30px;flex-basis:30px}
body.ds-app #sup .sup-card-phone{margin:6px 0 5px 50px}
body.ds-app #sup .sup-card-facts{margin:0 0 4px 50px}
body.ds-app #sup .sup-card-bottom{margin-left:50px}
body.ds-app #sup .supplier-focus{padding:9px}
body.ds-app #sup #detail .supplier-profile-heading{padding:10px;border-radius:8px}
body.ds-app #sup #detail .supplier-profile-heading h2{font-size:17px;line-height:1.3}
body.ds-app #sup #detail .supplier-actions .btn{padding:6px 9px;font-size:10px}
body.ds-app #sup #detail .supplier-detail-stats{gap:5px;margin:8px 0}
body.ds-app #sup #detail .supplier-detail-stats>div{padding:7px 6px}
body.ds-app #sup #detail .supplier-detail-stats b{font-size:16px}
body.ds-app #sup #detail .supplier-tabs{top:0;padding:5px 0;gap:3px;z-index:3}
body.ds-app #sup #detail .supplier-tab{padding:7px 8px;font-size:10px}
body.ds-app #sup #detail .supplier-tab-panel>.panel{padding:11px}
body.ds-app #sup .supplier-insights{padding:10px}
body.ds-app #sup .insight-grid{gap:6px}
body.ds-app #sup .insight-image{border-radius:7px}
body.ds-app #sup .insight-source{padding:8px}
body.ds-app #sup .supplier-pages{padding:8px 10px}
@media(min-width:1181px){
  body.ds-app #sup .supplier-insights{display:block!important}
  body.ds-app #sup .supplier-workbench{grid-template-columns:minmax(220px,.88fr) minmax(350px,1.58fr) minmax(210px,.8fr)}
}
/* Product: flat compact tabs; one screen catalog and side-by-side source details. */
body.ds-app .workspace:has(> #products:not(.hidden)){
  max-width:none;padding:13px 18px 24px;
}
body.ds-app #products>.title{margin-bottom:9px}
body.ds-app #products>.title h1{font-size:20px}
body.ds-app #products .product-command-panel{
  border:1px solid var(--ds-border);background:#fff;color:#1f344e;
  border-radius:10px;box-shadow:none;margin-bottom:10px;
}
body.ds-app #products .product-command-head{padding:10px 14px 8px;gap:12px}
body.ds-app #products .product-command-head h2{font-size:15px;color:#213852;margin:4px 0;letter-spacing:-.2px}
body.ds-app #products .product-command-head p{display:none}
body.ds-app #products .product-command-kicker{font-size:9px;color:#637fa9;letter-spacing:.7px}
body.ds-app #products .product-command-head .btn{
  background:#255fd4!important;color:#fff!important;border:1px solid #255fd4!important;
}
body.ds-app #products .product-mode-tabs{background:#fff;display:flex;gap:5px;padding:0 11px 9px}
body.ds-app #products .product-mode-btn{
  border-radius:7px;padding:8px 12px;min-width:0;flex:0 1 auto;
  font-size:11.5px;background:#f7f9fc;color:#42607e;border:1px solid #e6ebf3;
}
body.ds-app #products .product-mode-btn.active{background:#eaf1ff;color:#1e55b0;border-color:#c3d6fa}
body.ds-app #products .product-mode-btn span{font-size:9px;opacity:.65}
body.ds-app #products .product-workspace{
  grid-template-columns:minmax(260px,300px) 8px minmax(0,1fr);
  height:max(540px,calc(100dvh - 265px));min-height:540px;margin-top:8px;
}
body.ds-app #products .product-list-pane{height:100%;max-height:none;min-height:0;padding:12px}
body.ds-app #products .product-list-v2{height:100%;min-height:0;overflow-y:auto}
body.ds-app #products .product-detail-pane{
  min-height:0;height:100%;overflow-y:auto;overscroll-behavior:contain;padding:14px;
}
body.ds-app #products .product-detail-header{padding-bottom:10px;margin-bottom:9px}
body.ds-app #products .product-detail-header h3{font-size:17px}
body.ds-app #products .product-list-controls{margin:9px 0 8px;gap:6px}
body.ds-app #products .product-list-item{padding:7px 8px;gap:8px}
body.ds-app #products .product-list-item img{height:59px;width:61px}
body.ds-app #products .product-detail-kpis{margin:9px 0;gap:6px}
body.ds-app #products .product-detail-kpis>div{padding:8px 10px}
body.ds-app #products .product-detail-kpis b{font-size:18px}
body.ds-app #products .product-detail-tabs{margin:9px 0 11px;gap:4px}
body.ds-app #products .product-detail-tab{padding:8px 11px}
body.ds-app #products .product-images-grid{grid-template-columns:repeat(auto-fill,minmax(165px,1fr))}
body.ds-app #products .product-image-open img{height:160px;object-fit:contain;background:#f8fafc}
body.ds-app #products .source-thumb-btn img{height:98px;width:110px}
body.ds-app #products .product-source-layout{grid-template-columns:110px minmax(0,1fr)}
body.ds-app #products .unclassified-panel{margin-top:8px;box-shadow:none}
body.ds-app #products .unclassified-list{grid-template-columns:repeat(auto-fit,minmax(295px,1fr))}
body.ds-app #products .unclassified-item{padding:8px}
body.ds-app #products .unclassified-item .source-thumb-btn img{height:115px;object-fit:cover}
/* CRM: remove marketing billboard, show worklist and call actions earlier. */
body.ds-app .workspace:has(> #crm:not(.hidden)){
  max-width:none;padding:13px 18px 24px;
}
body.ds-app #crm>.title{margin-bottom:10px}
body.ds-app #crm>.title h1{font-size:20px}
body.ds-app #crm .crm-metrics{gap:7px;margin-bottom:9px}
body.ds-app #crm .crm-metrics .card{padding:9px 11px}
body.ds-app #crm .crm-metrics .metric{font-size:20px}
body.ds-app #crm .crm-workflow-board{
  background:#fff;color:var(--ds-text);border:1px solid var(--ds-border);
  border-radius:10px;box-shadow:none;padding:12px 14px;margin-bottom:9px;
}
body.ds-app #crm .ops-eyebrow{font-size:9px;color:#5375a9;letter-spacing:.7px}
body.ds-app #crm .crm-board-heading{margin-bottom:9px;gap:8px}
body.ds-app #crm .crm-board-heading h2{font-size:15px;color:#203751;margin:2px 0}
body.ds-app #crm .crm-board-heading p{font-size:10.5px;color:#64758d}
body.ds-app #crm .crm-board-status{color:#5173aa;background:#eff4fc;border:1px solid #e3eaf4;padding:5px 9px;font-size:10px}
body.ds-app #crm .crm-board-tiles{gap:6px}
body.ds-app #crm .crm-board-tile{
  background:#f8fafc;border:1px solid #e7ecf4;color:#314761;border-radius:8px;
  padding:7px 10px;gap:3px;min-height:66px;
}
body.ds-app #crm .crm-board-tile.active{background:#ebf2ff;border-color:#a8c3f3;color:#2455a3}
body.ds-app #crm .crm-board-tile:hover:not(.active){background:#f0f5fc}
body.ds-app #crm .crm-board-tile span{font-size:10.5px}
body.ds-app #crm .crm-board-tile b{font-size:21px;line-height:1.1}
body.ds-app #crm .crm-board-tile small{font-size:9.5px;color:#75869a;opacity:1}
body.ds-app #crm .crm-top-grid{gap:9px;grid-template-columns:minmax(0,1.45fr) minmax(305px,1fr)}
body.ds-app #crm .crm-bottom-grid{gap:9px;margin-top:9px}
body.ds-app #crm .crm-top-grid>.panel,body.ds-app #crm .crm-bottom-grid>.panel{
  border-radius:10px;box-shadow:none;padding:13px;
}
body.ds-app #crm .crm-filter-grid{margin-bottom:9px;gap:6px}
body.ds-app #crm .crm-work-table{max-height:calc(100dvh - 410px);min-height:180px}
body.ds-app #crm .crm-panel-title{margin-bottom:8px}
body.ds-app #crm .crm-panel-title h3{font-size:13px}
body.ds-app #crm .crm-card{border-radius:8px}
/* Ensure breakpoint-based legibility; keep operations usable on narrow screens. */
@media(max-width:1350px){
  body.ds-desk .columns{grid-template-columns:minmax(205px,27%) minmax(270px,1fr) minmax(215px,28%)}
  body.ds-app #sup .supplier-filter-grid{grid-template-columns:minmax(180px,1.3fr) repeat(4,minmax(100px,1fr))}
}
@media(max-width:1180px){
  body.ds-app #sup .supplier-workbench{grid-template-columns:minmax(230px,.86fr) minmax(0,1.38fr);gap:8px}
  body.ds-app #sup .supplier-insights{display:none}
  body.ds-app #sup .supplier-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.ds-app #products .product-workspace{grid-template-columns:minmax(235px,275px) 7px minmax(0,1fr)}
}
@media(max-width:980px){
  body.ds-desk .desk{height:auto;min-height:100dvh;overflow:visible}
  body.ds-desk .columns{display:flex;flex-direction:column;gap:8px}
  body.ds-desk .columns>.panel{min-height:300px;max-height:490px}
  body.ds-desk .columns>.panel:nth-child(2){max-height:650px}
  body.ds-desk .columns>.panel:nth-child(3){max-height:550px}
  body.ds-desk .kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.ds-desk #detailBody .hero-image{height:clamp(220px,40dvh,420px)}
  body.ds-app #crm .crm-top-grid{grid-template-columns:1fr}
  body.ds-app #crm .crm-work-table{max-height:440px}
  body.ds-app #sup .supplier-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body.ds-app #products .product-workspace{height:auto;display:flex;flex-direction:column}
  body.ds-app #products .product-list-pane{height:auto;max-height:400px}
  body.ds-app #products .product-detail-pane{min-height:420px;height:auto}
  body.ds-app #sup .supplier-workbench{height:auto;max-height:none;display:flex;flex-direction:column}
  body.ds-app #sup .supplier-insights{display:block}
  body.ds-app #crm .crm-board-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ds-app #crm .crm-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ds-desk .top-actions{gap:4px}
  body.ds-desk .top-actions button{font-size:10.5px;padding:7px 8px}
}
@media(max-width:560px){
  body.ds-desk .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ds-app #sup .supplier-filter-grid{grid-template-columns:1fr}
  body.ds-app #sup .supplier-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ds-app #products .product-mode-tabs{overflow-x:auto}
}
