/* ========================================================
   AÇÃO! - FOLHA DE ESTILOS UNIVERSAL (style.css)
======================================================== */

/* --- 1. VARIÁVEIS E GLOBAIS --- */
:root {
  /* Cores Globais da Marca */
  --primary: #122250;
  --primary-hover: #28386b;
  --text-dark: #1f2937;
  --text-light: #ffffff;

  /* Fundos Antigos / Básicos */
  --bg: #f3f4f6;
  --card: #ffffff;

  /* Cores Específicas do Novo Dashboard */
  --sidebar-bg: #4a72b8;
  --sidebar-logo-bg: #a3c1e8;
  --main-bg: #f0f4f8;
  --topbar-bg: #cbd7e9;
}

/* --- RESPONSIVIDADE (MOBILE) --- */

@media (max-width: 768px) {
    /* 1. Transforma o grid de 2 colunas em 1 coluna só */
    .dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* 2. Move o formulário para cima ou para baixo conforme o uso */
    .form-card {
        order: -1; /* Coloca o formulário no topo no celular para facilitar o cadastro */
        width: 100%;
    }

    /* 3. Ajusta a Sidebar para não ocupar espaço lateral */
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 10px;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row; /* Transforma o menu em uma linha horizontal */
        justify-content: space-around;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .sidebar-nav a {
        font-size: 0.7rem; /* Diminui a letra para caber tudo */
        padding: 10px 5px;
    }

    .main-wrapper {
        margin-left: 0; /* Remove o recuo da sidebar */
        padding: 10px;
    }

    /* 4. Ajusta a Timeline da Agenda */
    .timeline-list::before {
        left: 45px; /* Ajusta a linha conectora */
    }
    
    .timeline-item .time {
        width: 40px;
        font-size: 0.75rem;
    }
}

/* --- LÓGICA DO MENU RECOLHÍVEL --- */
/* --- ESTILO HAMBÚRGUER --- */
.hamburger-menu {
    display: none; /* Escondido no desktop */
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- LÓGICA DO MENU NO MOBILE --- */
.topbar {
    display: flex;
    align-items: center;
    gap: 15px; /* Espaço entre o botão e a busca */
    padding: 10px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

#searchInput {
    flex: 1; /* Faz a barra de busca ocupar todo o espaço restante */
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

#searchInput:focus {
    border-color: var(--primary); /* Azul do Syncro */
}
@media (max-width: 768px) {
    .hamburger-menu { display: flex; } /* Aparece no celular */

    .sidebar {
        position: fixed;
        left: -100%; /* Totalmente fora da tela à esquerda */
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        transition: left 0.3s ease; /* Efeito de deslizar */
        box-shadow: 10px 0 15px rgba(0,0,0,0.1);
    }

    /* Quando o menu está ATIVO */
    .sidebar.active {
        left: 0; /* Desliza para dentro da tela */
    }

    /* Ajuste do conteúdo principal: ocupa 100% da tela */
    .main-wrapper {
        margin-left: 0 !important;
        width: 100%;
        padding-top: 60px; /* Espaço para a topbar fixa */
    }

    /* Overlay: Fundo escuro atrás do menu */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .overlay.active {
        display: block;
    }
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
}

/* --- 2. ELEMENTOS COMUNS (Botões, Inputs, Utilitários) --- */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}
.hidden {
  display: none !important;
}
.row {
  display: flex;
  gap: 10px;
}
.row > div {
  flex: 1;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.95rem;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-main {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
  margin-bottom: 12px; /* <-- ADICIONE ESTA LINHA AQUI */
}

.btn-main:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* --- 3. PÁGINA DE LOGIN (index.html) --- */
.login-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 350px;
  width: 90%;
}
.hero h1 {
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 5px;
  margin-top: 0;
}
.hero p {
  color: #4b5563;
  margin-bottom: 25px;
  font-size: 0.9rem;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px;
  font-size: 0.9rem;
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}
.btn-outline:hover {
  background: #e0e7ff;
}
#errorMsg {
  color: #ef4444;
  font-size: 0.85rem;
  margin-bottom: 15px;
  display: none;
  font-weight: bold;
}

/* --- 4. NOVO DASHBOARD DE ATIVIDADES (Sidebar Layout) --- */
.dashboard-body {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--main-bg);
}
.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-header {
  background: var(--sidebar-logo-bg);
  padding: 30px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}
.sidebar-nav {
  flex: 1;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar-nav a {
  color: var(--text-light);
  text-decoration: none;
  padding: 15px 30px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: 0.2s;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.15);
}
.sidebar-footer {
  padding: 20px 30px;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.topbar {
  background: var(--topbar-bg);
  padding: 15px 30px;
  display: flex;
  align-items: center;
}
.topbar input {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  color: #4b5563;
  outline: none;
  width: 100%;
  max-width: 400px;
  margin-bottom: 0;
}
.content-area {
  padding: 30px;
  flex: 1;
}
.page-title {
  color: var(--sidebar-bg);
  margin-top: 0;
  margin-bottom: 30px;
  font-weight: 400;
  letter-spacing: 1px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  align-items: start;
}
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 200px;
  }
}

/* Cards das Atividades */
.date-header {
  font-size: 1.1rem;
  color: #4b5563;
  margin-bottom: 15px;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 5px;
}
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}
.task-card {
  border-radius: 8px;
  padding: 15px;
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: 0.2s;
}
.task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}
.task-card.concluida {
  background: #d1d5db;
  opacity: 0.7;
}
.task-card.concluida .task-desc {
  text-decoration: line-through;
  color: #6b7280;
}
.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.task-desc {
  font-weight: bold;
  font-size: 0.95rem;
  margin-top: 10px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 10px;
}
.task-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
  opacity: 0.7;
  transition: 0.2s;
}
.task-actions button:hover {
  opacity: 1;
}
.tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  font-weight: bold;
}

/* Formulário Lateral */
.form-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 2px solid #e5e7eb;
}
.form-card h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.1rem;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* --- 5. CABEÇALHOS E PÁGINA DE TEMPLATES (templates.html) --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 15px 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.app-header .logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links {
  display: flex;
  gap: 15px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 8px;
  transition: 0.2s;
}
.nav-links a.active {
  background: var(--primary);
  color: white;
}
.btn-sair {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-sair:hover {
  background: #fca5a5;
  text-decoration: none;
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
}

.card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  box-sizing: border-box;
}
.card-secundario {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}
.search-box {
  border: 2px solid var(--primary);
  background: #fff;
  margin-bottom: 20px;
}

.grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 768px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
}

.template-item {
  background: white;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid #e5e7eb;
}
.template-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.template-title {
  font-weight: bold;
  color: var(--text-dark);
  font-size: 1.05rem;
}
.template-preview {
  font-size: 0.9rem;
  color: #4b5563;
  background: #f9fafb;
  padding: 10px;
  border-radius: 6px;
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.btn-copy {
  background: #e0e7ff;
  color: #4338ca;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  transition: 0.2s;
}
.btn-copy:hover {
  background: #c7d2fe;
}
.btn-del {
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  display: none;
  z-index: 1000;
}

/* style.css */

/* Estilo para o logo na página de login */
.login-logo-custom {
  width: 90px; /* Ajuste este valor para o tamanho que você deseja */
  height: auto;
  margin-bottom: 10px; /* Para manter o espaçamento que você já tem */
  display: block; /* Para centralizar como o original */
  margin-left: auto;
  margin-right: auto;
} 

/* Estilo para o logo no painel principal (canto superior esquerdo) */
.painel-logo-custom {
  width: 150px; /* O logo no painel costuma ser um pouco maior */
  height: auto;
  /* Adicione margem ou padding se necessário para o posicionamento exato */
}

/* Estilos da Agenda Syncro */

.nav-btn {
  background: #cbd7e9;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: bold;
  color: var(--primary);
  transition: 0.2s;
}

.nav-btn:hover {
  background: var(--primary);
  color: white;
}

.week-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  width: 100%;
}
.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  min-width: 60px;
  background: rgba(255, 255, 255, 0.5);
  transition: 0.3s;
}
.week-day.active {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}
.week-day span {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: bold;
}
.week-day strong {
  font-size: 1.2rem;
}

.timeline-container {
  position: relative;
  margin-top: 20px;
}
.timeline-list {
  position: relative;
  padding-left: 10px;
}
/* Linha vertical conectora */
.timeline-list::before {
  content: "";
  position: absolute;
  left: 65px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #cbd7e9;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  position: relative;
}
.timeline-item .time {
  width: 50px;
  font-weight: bold;
  font-size: 0.85rem;
  color: #4b5563;
  text-align: right;
}
.timeline-item .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd7e9;
  z-index: 1;
  border: 3px solid var(--main-bg);
}
.timeline-item.prio-3 .dot {
  background: #ef4444;
}
.timeline-item.prio-2 .dot {
  background: #f59e0b;
}
.timeline-item.prio-1 .dot {
  background: #3b82f6;
}

.task-info {
  background: white;
  padding: 15px;
  border-radius: 12px;
  flex: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.task-info h4 {
  margin: 0 0 5px 0;
  font-size: 1rem;
  color: var(--primary);
}

/* --- ESTILOS DOS PROJETOS --- */
.project-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.project-title {
  margin: 0;
  color: var(--primary);
  font-size: 1.2rem;
}

.project-desc {
  color: #4b5563;
  font-size: 0.95rem;
  margin-top: 0;
  flex: 1;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  border-top: 1px solid #f3f4f6;
  padding-top: 15px;
}
.proj-deadline {
  font-size: 0.85rem;
  font-weight: bold;
  color: #6b7280;
}

.proj-status {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 20px;
}
.status-andamento {
  background: #e0e7ff;
  color: #3730a3;
} /* Azul */
.status-concluido {
  background: #dcfce7;
  color: #166534;
} /* Verde */
.status-pausado {
  background: #f3f4f6;
  color: #4b5563;
} /* Cinza */
