/* ---------------------------------------------------------
   BASE
--------------------------------------------------------- */
@layer base {
  html {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ---------------------------------------------------------
   SCROLLBAR (suave)
--------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ---------------------------------------------------------
   ESTILOS DE NAVEGAÇÃO ATIVA
--------------------------------------------------------- */
.nav-link.active {
  background-color: #f3e8ff;
  color: #7e22ce;
  font-weight: 600;
}
.nav-link.active svg {
  color: #7e22ce;
}

/* ---------------------------------------------------------
   REMOVER SETAS DO INPUT NUMBER
--------------------------------------------------------- */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield;
}

/* ---------------------------------------------------------
   LOGO
--------------------------------------------------------- */
.app-logo {
  height: var(--logo-height);
  width: auto;
  object-fit: contain;
}

/* ---------------------------------------------------------
   CONTAINER DA LOGO
--------------------------------------------------------- */
.logo-container {
  height: calc(var(--logo-height) + (var(--header-padding) * 2));
  display: flex;
  align-items: center;
}

/* ---------------------------------------------------------
   TRANSIÇÕES GERAIS
--------------------------------------------------------- */
/* Esconde menus quando estamos na página de projetos */
body[data-page="projetos"] header.mobile-header,
body[data-page="projetos"] #mobile-menu-btn,
body[data-page="projetos"] #mobile-menu,
body[data-page="projetos"] #mobile-sidebar-panel,
body[data-page="projetos"] nav#desktop-sidebar {
    display: none !important;
}


.ui-anim {
  transition: all 240ms cubic-bezier(.2,.9,.3,1);
}

button,
input,
select {
  transition:
    box-shadow 240ms cubic-bezier(.2,.9,.3,1),
    transform 240ms cubic-bezier(.2,.9,.3,1),
    background-color 240ms cubic-bezier(.2,.9,.3,1);
}

button:active,
.card-hover:active {
  transform: scale(0.97);
}
/* Botões do rodapé do sidebar */
.sidebar-btn {
  width: auto !important;
  padding: 0.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 0.75rem !important;
}

#desktop-sidebar.md\:w-20 .nav-link {
  width: 3.5rem !important;
  padding: 0.5rem !important;
  margin: 0.5rem auto !important;
}

/* Espaço inferior do bloco de botões do sidebar */
#desktop-sidebar .sidebar-footer {
  margin-bottom: 1.25rem !important;
}

/* CORREÇÃO REAL — espaçamento entre os botões do sidebar */
#desktop-sidebar li {
  margin-bottom: 0.75rem !important;
}

/* ---------------------------------------------------------
   CARDS COM LEVE ELEVAÇÃO
--------------------------------------------------------- */
.card-hover {
  transition:
    transform 260ms cubic-bezier(.2,.9,.3,1),
    box-shadow 260ms cubic-bezier(.2,.9,.3,1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

/* ---------------------------------------------------------
   BARRAS DE PROGRESSO (suave)
--------------------------------------------------------- */
.progress-bar {
  transition: width 300ms cubic-bezier(.2,.9,.3,1);
}

/* ---------------------------------------------------------
   MODAL
--------------------------------------------------------- */
#export-modal {
  backdrop-filter: blur(6px);
  transition: opacity 250ms ease, transform 220ms ease;
}
#export-modal > .modal-inner {
  animation: modalPop 300ms cubic-bezier(.2,.9,.3,1);
}

@keyframes modalPop {
  0% { transform: scale(0.92) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ---------------------------------------------------------
   MENU MOBILE (painel deslizante)
--------------------------------------------------------- */
#mobile-sidebar-panel {
  transition: transform 300ms cubic-bezier(.2,.9,.3,1);
}

#mobile-menu.hidden {
  pointer-events: none !important;
}

/* ---------------------------------------------------------
   LINK HOVER MOBILE / DESKTOP
--------------------------------------------------------- */
.nav-link:hover {
  background-color: #f8fafc;
}

/* ---------------------------------------------------------
   BOTÕES COM HOVER SUAVE
--------------------------------------------------------- */
button:hover {
  filter: brightness(1.03);
}

/* ---------------------------------------------------------
   TABELAS RESPONSIVAS
--------------------------------------------------------- */
table th,
table td {
  transition: background-color 200ms ease;
}

table tbody tr:hover {
  background-color: rgba(124, 58, 237, 0.04);
}

/* ---------------------------------------------------------
   COPYRIGHT BAR
--------------------------------------------------------- */
.copyright-bar {
  background: linear-gradient(90deg, rgba(99,102,241,0.04), rgba(124,58,237,0.02));
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
  margin-top: 12px;
}

/* ---------------------------------------------------------
   RESPONSIVIDADE - CONTROLE DE MENUS
--------------------------------------------------------- */

/* Desktop: mostra sidebar, esconde header mobile */
@media (min-width: 768px) {
  #desktop-sidebar {
    display: flex !important;
  }
  
  header.mobile-header {
    display: none !important;
  }
  
  #mobile-menu {
    display: none !important;
  }
}

/* Mobile: esconde sidebar, mostra header mobile */
@media (max-width: 767px) {
  #desktop-sidebar {
    display: none !important;
  }
  
  header.mobile-header {
    display: flex !important;
  }
}

/* ---------------------------------------------------------
   MOBILE OPTIMIZATION
--------------------------------------------------------- */
@media (max-width: 640px) {
  .card-hover:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  input,
  select,
  button {
    font-size: 1rem;
  }

  .page h1 {
    font-size: 1.9rem;
  }

  table {
    font-size: 0.85rem;
  }
}

/* ---------------------------------------------------------
   SUAVIZAÇÃO PARA PÁGINAS COM TRANSIÇÃO DE VISIBILIDADE
--------------------------------------------------------- */
.page {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  display: none;
}
.page:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

/* ---------------------------------------------------------
   FOCUS RING ACESSÍVEL
--------------------------------------------------------- */
:focus {
  outline: 3px solid rgba(124, 58, 237, 0.25);
  outline-offset: 4px;
  border-radius: 6px;
}

/* flutuantes: somente mobile */
#mobile-floating-actions {
  display: none;
}

/* aparece apenas no mobile */
@media (max-width: 767px) {
  #mobile-floating-actions {
    display: flex;
  }
}

/* opcional: esconder quando o menu mobile estiver aberto */
body.mobile-menu-open #mobile-floating-actions {
  display: none;
}

/* remove qualquer regra antiga do desktop (se ainda existir no seu CSS) */
#floating-actions-desktop {
  display: none !important;
}
body.sidebar-collapsed #floating-actions-desktop {
  display: none !important;
}
.sidebar-actions-elevated{
  box-shadow: 0 -10px 70px -14px rgba(0,0,0,.13)
}
body.is-projects #mobile-floating-actions {
  display: none !important;
}
body[data-page="login"] #mobile-floating-actions {
  display: none !important;
}
