/* v2026.01.00 · Point 07.4 — window-responsive workspace */
.home-finance-strip{display:contents}

/* Scrolling remains available, but the application never exposes native
   scrollbar chrome. */
html,body,*{
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}

/* At half-screen width the CRM keeps the simpler two-stage composition. */
@media (max-width:960px) and (min-width:761px){
  .crm-stage-v15[data-stage="Cliente"]{display:none!important}
}
html::-webkit-scrollbar,body::-webkit-scrollbar,*::-webkit-scrollbar{
  display:none!important;
  width:0!important;
  height:0!important;
}

/* Utility icons sit on the same visual centre regardless of font metrics. */
#notificationButton{
  display:grid!important;
  place-items:center!important;
  padding:0!important;
}
#notificationButton>i{
  display:grid!important;
  width:1em!important;
  height:1em!important;
  place-items:center!important;
  margin:0!important;
  line-height:1!important;
}
#notificationButton>i::before{
  display:block!important;
  line-height:1!important;
  transform:translateY(1px)!important;
}

/* Every dense horizontal surface stays complete and scrollable without showing
   browser chrome. The content remains reachable with touch, trackpad and keys. */
:is(.home-widget-grid,.task-pipeline,.crm-pipeline-v15,.billing-table-wrap,
  .report-table-wrap-v15,.time-compact-table,.automation-table-wrap){
  scrollbar-width:none;
  -ms-overflow-style:none;
}
:is(.home-widget-grid,.task-pipeline,.crm-pipeline-v15,.billing-table-wrap,
  .report-table-wrap-v15,.time-compact-table,.automation-table-wrap)::-webkit-scrollbar{
  display:none;width:0;height:0;
}

/* Compressed desktop: soften the transition before the compact composition. */
@media (max-width:1600px) and (min-width:1441px){
  .topbar>div:has(#pageTitle),.city-clocks,.collaboration-presence{display:none!important}
  .topbar{padding-inline:18px!important}
  .top-actions{margin-left:auto!important}

  .home-candidate-header{align-items:end!important}
  .home-candidate-toolbar{min-width:0!important}
  .home-candidate .global-date-filter{grid-template-columns:minmax(130px,.8fr) repeat(2,minmax(165px,1fr))!important}
  .home-widget-grid{grid-template-columns:repeat(10,minmax(0,1fr))!important}
  .home-finance-strip{grid-column:1/-1;display:flex;gap:12px;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:none}
  .home-finance-strip::-webkit-scrollbar{display:none;width:0;height:0}
  .home-finance-strip>.home-widget{flex:0 0 min(310px,34vw);width:auto!important;grid-column:auto!important;scroll-snap-align:start}

  .task-pipeline{grid-template-columns:repeat(3,minmax(310px,1fr))!important;overflow-x:auto!important;overscroll-behavior-inline:contain}
  .crm-kpis-v15{display:flex!important;overflow-x:auto;scrollbar-width:none}
  .crm-kpis-v15>.crm-kpi-v15{flex:0 0 min(330px,35vw)}
  .crm-pipeline-v15{grid-template-columns:repeat(var(--crm-stage-count,5),minmax(280px,1fr))!important;overflow-x:auto!important}
  .billing-filter-summary-row{align-items:end!important;grid-template-columns:minmax(0,1fr)!important}
  .billing-summary{justify-self:end!important}
  .billing-table-wrap,.report-table-wrap-v15,.time-compact-table{overflow-x:auto!important}
  .billing-plan-table{min-width:1050px!important}
  .report-table-v15{min-width:1120px!important}
  .time-entry-row,.time-entry-head{min-width:930px!important}
}

/* Compact window mode. From roughly three quarters of a desktop window down,
   use the same hierarchy as the previous half-window layout. The dedicated
   mobile views continue to own widths up to 760px. */
@media (max-width:1440px) and (min-width:761px){
  html:has(#content>.home-candidate),body:has(#content>.home-candidate){height:auto!important;min-height:100%;overflow-y:auto!important}
  .app-shell:has(#content>.home-candidate),main:has(#content>.home-candidate),#content:has(>.home-candidate){height:auto!important;min-height:0!important;overflow-y:visible!important}
  .topbar>div:has(#pageTitle),.city-clocks,.collaboration-presence{display:none!important}
  .topbar{padding-inline:16px!important}
  .top-actions{margin-left:auto!important}
  .top-actions .focus-top-button,.top-actions .notification-button{display:flex!important}

  #content{padding-inline:16px!important;overflow-x:hidden}
  .home-candidate-header{display:grid!important;gap:16px!important}
  .home-candidate-header .welcome-block{display:none!important}
  .home-candidate-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;width:100%!important}
  .home-candidate .global-date-filter{grid-template-columns:minmax(0,1fr)!important}
  .home-candidate .global-date-filter .overview-date-control{display:none!important}
  .home-widget-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;overflow:visible!important}
  .home-finance-strip{grid-column:1;display:flex;gap:12px;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x mandatory;scrollbar-width:none}
  .home-finance-strip::-webkit-scrollbar{display:none;width:0;height:0}
  .home-finance-strip>.home-widget{flex:0 0 min(280px,82vw);width:auto!important;grid-column:auto!important;scroll-snap-align:start}
  .home-widget{grid-column:1!important;width:auto!important}
  .home-widget>.card{min-width:0!important}

  .tasks-page-v15>.task-filterbar-v15.crm-filter-bar-v15,.crm-toolbar-v15,
  .report-filter-controls-v15{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .tasks-page-v15>.task-filterbar-v15>*,:is(.crm-toolbar-v15,.billing-filter-bar,.report-create-controls-v15,.report-filter-controls-v15)>*{
    grid-column:1!important;width:100%!important;min-width:0!important;
  }
  .task-pipeline{grid-template-columns:repeat(3,minmax(285px,82vw))!important;overflow-x:auto!important;scroll-snap-type:x mandatory}
  .task-pipeline>.task-column{scroll-snap-align:start}

  .crm-kpis-v15,.crm-stage-summary{display:none!important}
  .crm-overview-v15{height:100%!important;min-height:0!important;grid-template-rows:minmax(0,1fr)!important}
  .crm-workspace-v15{height:100%!important;min-height:0!important;grid-template-rows:auto minmax(0,1fr)!important}
  .crm-pipeline-scroll-v15{height:100%!important;min-height:0!important;overflow-x:auto!important;overflow-y:hidden!important}
  .crm-pipeline-v15{display:flex!important;gap:12px;overflow-x:auto!important;scroll-snap-type:x mandatory}
  .crm-pipeline-v15{height:100%!important;min-height:100%!important;align-items:stretch!important}
  .crm-stage-v15{height:100%!important;min-height:0!important;align-self:stretch!important;flex:0 0 min(420px,82vw);scroll-snap-align:start}
  .crm-stage-v15[data-stage="Perdido"]{display:none!important}

  .time-layout{grid-template-columns:minmax(0,1fr)!important}
  .time-insights{display:none!important}
  .time-composer{grid-template-columns:minmax(0,1fr)!important}
  .time-composer .timer-selects{grid-column:1!important;grid-template-columns:minmax(0,1fr)!important}
  .time-compact-table{overflow-x:auto!important;padding-bottom:14px!important}
  .time-entry-head,.time-entry-row{grid-template-columns:var(--time-history-columns)!important;min-width:930px!important}

  #content:has(>.billing-page),#content:has(>.expenses-page),#content:has(>.reports-page-v15){height:calc(100dvh - 78px)!important;overflow-y:auto!important;padding-bottom:24px!important}
  #content>:is(.billing-page,.expenses-page,.reports-page-v15){height:auto!important;min-height:100%!important;overflow:visible!important}
  .billing-page,.reports-page-v15{grid-template-rows:auto auto auto!important}
  .billing-filter-summary-row{grid-template-columns:minmax(0,1fr)!important}
  .billing-filter-bar,.expense-filter-bar{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;
  }
  .report-create-controls-v15{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  :is(.billing-filter-bar,.expense-filter-bar,.report-create-controls-v15)>*{grid-column:auto!important;width:100%!important;min-width:0!important}
  .billing-summary{justify-self:stretch!important;text-align:left!important}
  .billing-plan-header,.report-archive-head-v15{align-items:stretch!important;flex-direction:column!important}
  .billing-plan-tools{width:100%!important}
  .billing-table-wrap,.report-table-wrap-v15{overflow-x:auto!important}
  .billing-plan-table{display:table!important;min-width:1050px!important}
  .billing-plan-card>.billing-table-wrap,.expense-plan-card>.billing-table-wrap{min-height:420px!important;max-height:62dvh!important;overflow:auto!important}
  .report-archive-v15{display:grid!important;grid-template-rows:auto minmax(420px,auto)!important;overflow:visible!important}
  .report-table-wrap-v15{min-height:420px!important;max-height:62dvh!important;overflow:auto!important}
  .report-table-v15{display:table!important;min-width:1120px!important}
  .report-table-v15 thead{display:table-header-group!important}
  .report-table-v15 tbody{display:table-row-group!important}
  .report-table-v15 tbody tr{display:table-row!important}
  .report-table-v15 td{display:table-cell!important;white-space:nowrap!important}
  .report-table-v15 td::before{display:none!important}
  .report-kpis-v15{display:none!important}
  .report-generate-v15{width:100%!important}

  .quote-kpis,.contracts-summary{display:none!important}
  .quotes-page,.contracts-page{grid-template-rows:auto minmax(0,1fr)!important}

  .mobile-native-view{display:grid;gap:16px;width:100%;max-width:100%;grid-template-columns:minmax(0,1fr)!important}
  .mobile-view-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:4px 2px}
  .mobile-view-heading small{display:block;margin-bottom:4px;color:var(--margi-muted);font-size:8px;font-weight:750;letter-spacing:.12em}
  .mobile-view-heading h2{margin:0;font-size:27px;line-height:1.05}
  .mobile-simple-tasks{gap:18px}
  .mobile-task-group{display:grid;gap:10px}
  .mobile-task-group>header{display:flex;align-items:center;justify-content:space-between}
  .mobile-task-group>header h3{margin:0;font-size:12px;letter-spacing:.06em}
  .mobile-task-list{display:grid;gap:8px}
  .mobile-simple-tasks .mobile-task-list article{display:grid;grid-template-columns:30px minmax(0,1fr)!important;align-items:center!important;gap:12px;padding:15px 13px;border:1px solid transparent!important;border-radius:var(--margi-radius);color:var(--margi-ink)!important}
  .mobile-simple-tasks .mobile-task-list article>div{display:grid;min-width:0;gap:7px}
  .mobile-simple-tasks .mobile-task-list article.is-to-do{background:#D7EAE8!important}
  .mobile-simple-tasks .mobile-task-list article.is-in-progress{background:#EAF261!important}
  .mobile-simple-tasks .mobile-task-check{display:grid;place-items:center;width:30px!important;height:30px!important;min-width:30px!important;border:1px solid var(--margi-ink);border-radius:50%!important;background:var(--margi-surface)}
  .mobile-time-view{display:grid;gap:16px;padding-top:4px}
  .mobile-time-focus{display:grid;place-items:center;padding:0!important;border:0!important;background:transparent!important}
  .mobile-time-focus>input{box-sizing:border-box;width:100%!important;min-height:48px!important;padding:0 14px!important;border:1px solid var(--margi-control-line)!important;border-radius:var(--margi-radius)!important;background:transparent!important;color:var(--margi-ink)!important}
  .mobile-time-selects{display:grid;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;width:100%;margin:10px 0 24px!important}
  .mobile-time-selects .billing-dropdown{width:100%;min-width:0}
  .mobile-time-selects .margi-dropdown-trigger{width:100%!important;min-height:48px!important}
  .mobile-time-clock{font-family:var(--margi-font-display),sans-serif!important;font-size:64px!important;line-height:1!important}
  .mobile-time-actions{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:20px}
  .mobile-time-focus .play-btn,.mobile-time-stop{display:grid!important;place-items:center;width:60px!important;height:60px!important;margin:0!important;border:1px solid var(--margi-ink)!important;border-radius:var(--margi-radius)!important;background:var(--margi-accent)!important;color:var(--margi-ink)!important}
  .mobile-section{padding:17px 15px;border:1px solid var(--margi-control-line);border-radius:var(--margi-radius);background:var(--margi-surface)}
  .mobile-section>header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:12px}
  .mobile-recent-time{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important}
  .mobile-recent-time>button{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;min-height:66px!important;padding:12px 0!important;border:0!important;border-top:1px solid transparent!important;border-bottom:1px solid transparent!important;border-radius:0!important;background:transparent!important;text-align:left}
  .mobile-recent-time>button strong{font-size:13px!important}
  .mobile-recent-time>button small{font-size:10px!important}
  .mobile-recent-time>button>b{font-size:12px!important}

  .automation-configured{overflow:hidden}
  .automation-table-wrap{overflow-x:auto!important}
  .automation-configured table{min-width:880px!important}
  .automation-table .billing-row-actions{display:grid!important;gap:8px!important}

  dialog.record-editor{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;margin:0!important;border-radius:0!important}
}

@media (max-width:760px){
  html,body{height:auto!important;min-height:100%!important;overflow-y:auto!important;overscroll-behavior-y:auto!important}
  .app-shell,main,#content{height:auto!important;min-height:0!important;overflow-y:visible!important}
  #content{padding-bottom:calc(78px + env(safe-area-inset-bottom))!important}
}
