/* Techlead Tasks - fullscreen enterprise fix */

html,
body{
  width:100% !important;
  max-width:none !important;
  min-height:100% !important;
  margin:0 !important;
  padding:0 !important;
  overflow-x:hidden !important;
}

body{
  background:#edf4fb !important;
}

/* Remove layout centrado */
body > div,
body > main,
.page,
.app,
.portal,
.dashboard,
.dashboard-page,
.layout,
.wrapper,
.shell,
.container,
.content,
.main,
.dashboard-content{
  max-width:none !important;
}

/* App ocupa a janela */
.tl-fullscreen-enterprise .app,
.tl-fullscreen-enterprise .portal,
.tl-fullscreen-enterprise .dashboard,
.tl-fullscreen-enterprise .dashboard-page,
.tl-fullscreen-enterprise .shell,
.tl-fullscreen-enterprise .wrapper,
.tl-fullscreen-enterprise body > div:first-child{
  width:100vw !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* Se existir grid com sidebar, manter encostado */
.tl-fullscreen-enterprise .app,
.tl-fullscreen-enterprise .portal,
.tl-fullscreen-enterprise .dashboard-page,
.tl-fullscreen-enterprise .shell{
  display:grid !important;
  grid-template-columns:250px minmax(0,1fr) !important;
  min-height:100vh !important;
}

/* Sidebar */
.tl-fullscreen-enterprise aside,
.tl-fullscreen-enterprise .sidebar,
.tl-fullscreen-enterprise .side,
.tl-fullscreen-enterprise nav.sidebar{
  width:250px !important;
  min-width:250px !important;
  max-width:250px !important;
  margin:0 !important;
  left:0 !important;
  border-radius:0 !important;
}

/* Conteúdo principal */
.tl-fullscreen-enterprise main,
.tl-fullscreen-enterprise .main,
.tl-fullscreen-enterprise .content,
.tl-fullscreen-enterprise .dashboard-content{
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 !important;
  padding:20px 26px 28px !important;
}

/* Header do conteúdo */
.tl-fullscreen-enterprise .topbar,
.tl-fullscreen-enterprise .header,
.tl-fullscreen-enterprise .app-header,
.tl-fullscreen-enterprise .page-header{
  width:100% !important;
  max-width:none !important;
  margin:0 0 18px !important;
  border-radius:0 !important;
}

/* Breadcrumb / início */
.tl-breadcrumb{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  color:#5c7089;
  font-size:13px;
  font-weight:800;
}

.tl-breadcrumb a{
  color:#2563eb;
  text-decoration:none;
  font-weight:900;
}

.tl-breadcrumb span{
  color:#8a9bb0;
}

/* Cards topo ocupam bem o espaço */
.tl-fullscreen-enterprise .stats,
.tl-fullscreen-enterprise .kpis,
.tl-fullscreen-enterprise .cards,
.tl-fullscreen-enterprise .metrics{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:16px !important;
  width:100% !important;
}

/* Layout principal mais equilibrado */
.tl-fullscreen-enterprise .dashboard-grid,
.tl-fullscreen-enterprise .grid,
.tl-fullscreen-enterprise .layout{
  grid-template-columns:410px minmax(0,1fr) !important;
  gap:20px !important;
  width:100% !important;
}

/* Formulário mais compacto */
.tl-fullscreen-enterprise form{
  padding:20px !important;
}

.tl-fullscreen-enterprise input,
.tl-fullscreen-enterprise textarea,
.tl-fullscreen-enterprise select{
  font-size:13px !important;
  padding:11px 13px !important;
}

.tl-fullscreen-enterprise textarea{
  min-height:95px !important;
}

/* Tabela */
.tl-fullscreen-enterprise table{
  width:100% !important;
  min-width:920px !important;
}

.tl-fullscreen-enterprise tbody td{
  padding:13px 14px !important;
}

/* Ações: corrigir botões gigantes/empilhados */
.tl-fullscreen-enterprise td:last-child{
  display:table-cell !important;
  white-space:nowrap !important;
  min-width:170px !important;
}

.tl-fullscreen-enterprise td:last-child form,
.tl-fullscreen-enterprise td:last-child .actions,
.tl-fullscreen-enterprise td:last-child div{
  display:inline-flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:8px !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

.tl-fullscreen-enterprise td:last-child button,
.tl-fullscreen-enterprise td:last-child a,
.tl-fullscreen-enterprise .actions button,
.tl-fullscreen-enterprise .actions a{
  width:auto !important;
  min-width:74px !important;
  min-height:34px !important;
  padding:8px 11px !important;
  font-size:12px !important;
  border-radius:10px !important;
  box-shadow:none !important;
}

/* Link Início adicionado por JS */
.tl-home-link{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  color:#e7f3ff !important;
  text-decoration:none !important;
  font-weight:850 !important;
  font-size:13px !important;
  padding:10px 12px !important;
  border-radius:12px !important;
  margin:5px 0 !important;
}

.tl-home-link:hover{
  background:rgba(59,130,246,.22) !important;
}

.tl-home-link span{
  width:22px !important;
  height:22px !important;
  border-radius:8px !important;
  background:#102a45 !important;
  display:grid !important;
  place-items:center !important;
}

/* Mobile */
@media(max-width:1100px){
  .tl-fullscreen-enterprise .app,
  .tl-fullscreen-enterprise .portal,
  .tl-fullscreen-enterprise .dashboard-page,
  .tl-fullscreen-enterprise .shell{
    grid-template-columns:1fr !important;
  }

  .tl-fullscreen-enterprise aside,
  .tl-fullscreen-enterprise .sidebar,
  .tl-fullscreen-enterprise .side{
    display:none !important;
  }

  .tl-fullscreen-enterprise .stats,
  .tl-fullscreen-enterprise .kpis,
  .tl-fullscreen-enterprise .cards,
  .tl-fullscreen-enterprise .metrics{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .tl-fullscreen-enterprise .dashboard-grid,
  .tl-fullscreen-enterprise .grid,
  .tl-fullscreen-enterprise .layout{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:720px){
  .tl-fullscreen-enterprise main,
  .tl-fullscreen-enterprise .main,
  .tl-fullscreen-enterprise .content,
  .tl-fullscreen-enterprise .dashboard-content{
    padding:16px !important;
  }

  .tl-fullscreen-enterprise .stats,
  .tl-fullscreen-enterprise .kpis,
  .tl-fullscreen-enterprise .cards,
  .tl-fullscreen-enterprise .metrics{
    grid-template-columns:1fr !important;
  }
}
