/* ==========================================================================
   1. VARIÁVEIS & RESET GLOBAL
   ========================================================================== */
   :root {
    --primary: #4F46E5;
    --primary-hover: #4338ca;
    --secondary: #64748b;
    --bg: #F3F4F6;
    --white: #FFFFFF;
    --text: #1F2937;
    --sidebar-bg: #111827;
    --sidebar-width: 260px;
    --header-height: 60px;
    --transition-speed: 0.3s;

    /* Cores dos Cards */
    --card-bg-normal: #F0F9FF;
    --card-border-normal: #BAE6FD;
    --card-bg-urgente: #FEF2F2;
    --card-border-urgente: #FECACA;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body { background-color: var(--bg); color: var(--text); overflow-x: hidden; }

/* Utilitários */
.hidden { display: none !important; }
.alerta { padding: 10px; border-radius: 4px; font-size: 0.9rem; margin-bottom: 15px; }
.alerta.erro { background: #FEE2E2; color: #991B1B; }
.alerta.sucesso { background: #D1FAE5; color: #065F46; }

/* ==========================================================================
   2. TELA DE LOGIN (CORREÇÃO DO OLHINHO)
   ========================================================================== */
.bg-login {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #F3F4F6 0%, #E0E7FF 100%);
    padding: 1rem;
}

.login-container {
    background: white; width: 100%; max-width: 400px;
    padding: 2.5rem; border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-header h1 { color: var(--primary); font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.login-header p { color: #6B7280; margin-bottom: 2rem; font-size: 0.95rem; }

.form-login { text-align: left; }
.grupo-input { margin-bottom: 1.25rem; }
.grupo-input label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.5rem; }

.grupo-input input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%; padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB; border-radius: 6px;
    font-size: 1rem; outline: none;
    transition: border-color 0.2s;
    background-color: white;
}
.grupo-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

/* WRAPPER DE SENHA COM OLHINHO */
.input-senha-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-senha-wrapper input {
    width: 100%;
    padding-right: 45px !important; /* Espaço para o botão */
}

.btn-toggle-senha {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #9CA3AF;
    z-index: 5;
}
.btn-toggle-senha:hover { color: var(--primary); }

.btn-full {
    width: 100%; padding: 0.875rem; font-size: 1rem; margin-top: 0.5rem;
    border: none; background-color: var(--primary); color: white;
    border-radius: 6px; font-weight: 600; cursor: pointer;
    transition: background-color 0.2s;
}
.btn-full:hover { background-color: var(--primary-hover); }

.toggle-form { margin-top: 1.5rem; font-size: 0.9rem; color: #6B7280; text-align: center; }
.toggle-form a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* ==========================================================================
   3. LAYOUT PRINCIPAL (SIDEBAR E CONTENT)
   ========================================================================== */
.app-container {
    display: flex; min-height: 100vh; width: 100%;
    position: relative; transition: all var(--transition-speed) ease;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width); background: var(--sidebar-bg); color: #9CA3AF;
    display: flex; flex-direction: column;
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
    transition: transform var(--transition-speed) ease;
    transform: translateX(0);
}

.sidebar-header {
    height: var(--header-height); display: flex;
    align-items: center; justify-content: space-between;
    padding: 0 1.5rem; background: rgba(0,0,0,0.2);
}
.sidebar .logo { color: white; font-size: 1.25rem; font-weight: bold; }

.user-info { padding: 1rem 1.5rem; border-bottom: 1px solid #374151; font-size: 0.9rem; }

.menu-mundos { flex: 1; padding: 1rem; overflow-y: auto; }
.menu-mundos h3 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; color: #4b5563; font-weight: bold; }
.menu-mundos ul { list-style: none; }
.menu-mundos li a {
    display: block; padding: 0.75rem 1rem;
    color: #D1D5DB; text-decoration: none;
    border-radius: 6px; margin-bottom: 0.25rem; font-size: 0.95rem;
    transition: background 0.2s;
}
.menu-mundos li.ativo a, .menu-mundos li a:hover { background: #374151; color: white; }

.btn-novo-mundo {
    display: block; text-align: center; margin-top: 1rem; padding: 0.75rem;
    border: 1px dashed #4b5563; color: #9CA3AF; border-radius: 6px;
    text-decoration: none; font-size: 0.85rem;
}
.btn-novo-mundo:hover { border-color: var(--primary); color: var(--primary); }

.logout { padding: 1.5rem; border-top: 1px solid #374151; }
.logout a { color: #ef4444; text-decoration: none; font-size: 0.9rem; }

/* Content */
.content {
    flex: 1; display: flex; flex-direction: column;
    margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width));
    transition: margin-left var(--transition-speed) ease, width var(--transition-speed) ease;
}

/* Menu Fechado (Desktop Squeeze) */
body.menu-closed .sidebar { transform: translateX(-100%); }
body.menu-closed .content { margin-left: 0; width: 100%; }

/* Top Bar */
.top-bar {
    background: var(--white); height: var(--header-height);
    padding: 0 1.5rem; border-bottom: 1px solid #E5E7EB;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 90;
}

.btn-hamburger {
    background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: var(--text); margin-right: 1rem;
}
.page-title { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.top-actions { display: flex; gap: 0.75rem; align-items: center; }

/* ==========================================================================
   4. ABAS (TABS) - CORRIGIDO
   ========================================================================== */
.tabs-header {
    display: flex;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 1.5rem;
    background: transparent;
    padding: 0 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    gap: 1rem;
}

.tab-btn {
    padding: 0.8rem 1.2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover { color: var(--primary); }

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Indicador de conteúdo (bolinha) */
.tab-btn.com-conteudo::after {
    content: '•';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 1.5rem;
    color: var(--primary);
    line-height: 1;
}

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   5. COMPONENTES DE UI (BOTÕES E INPUTS)
   ========================================================================== */
.btn-padrao {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
    border-radius: 6px; cursor: pointer; transition: all 0.2s;
    text-decoration: none; border: 1px solid transparent; height: 36px;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-outline { background-color: transparent; border-color: #D1D5DB; color: var(--text); }
.btn-outline:hover { background-color: #F9FAFB; border-color: #9CA3AF; }
.btn-perigo { background-color: #EF4444; color: white; border: none; }
.btn-perigo:hover { background-color: #DC2626; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Inputs Genéricos (formulários de criação) */
.form-box input[type="text"], .form-box input[type="datetime-local"], .form-box select, .form-box textarea {
    width: 100%; padding: 0.7rem; border: 1px solid #D1D5DB; border-radius: 6px;
    outline: none; background: white;
}

/* ==========================================================================
   6. MÓDULO: TAREFAS (DASHBOARD)
   ========================================================================== */
.painel-atividades { padding: 1.5rem; flex: 1; overflow-y: auto; }

.header-tarefas {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}

/* Controles de Visão (Lista/Kanban) */
.view-toggle {
    display: flex;
    background: #F3F4F6;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid #E5E7EB;
}
.btn-view {
    background: transparent;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    color: #6B7280;
    font-size: 1.1rem;
}
.btn-view.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Filtros (Barra Principal) */
.filtros-bar { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }
.btn-filtro {
    padding: 0.4rem 1rem; border-radius: 20px; border: 1px solid #D1D5DB;
    background: white; color: #4B5563; font-size: 0.85rem;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: all 0.2s;
}
.btn-filtro.ativo, .btn-filtro:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Filtro de Data (Visual Melhorado) */
.filtro-datas {
    display: flex; align-items: center; gap: 0.5rem; 
    background: white; padding: 0.3rem 0.5rem; 
    border-radius: 20px; border: 1px solid #D1D5DB;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.input-group-date {
    display: flex; align-items: center; gap: 4px; 
    border-right: 1px solid #F3F4F6; padding-right: 8px;
}
.input-group-date:last-of-type { border-right: none; }
.input-group-date span { font-size: 0.75rem; color: #6B7280; text-transform: uppercase; font-weight: 600; }
.filtro-datas input[type="date"] {
    border: none; outline: none; font-family: inherit; 
    font-size: 0.85rem; color: #374151; background: transparent;
    padding: 0; cursor: pointer;
}
.btn-buscar { 
    background: var(--primary); color: white; border: none; 
    border-radius: 50%; width: 28px; height: 28px; 
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; cursor: pointer; transition: background 0.2s;
}
.btn-buscar:hover { background: var(--primary-hover); }

/* Formulário Rápido */
.add-task-wrapper {
    background: white; padding: 1rem; border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 2rem;
    border: 1px solid #E5E7EB; display: flex; flex-direction: column; gap: 0.5rem;
}
.input-row { display: flex; width: 100%; gap: 0.75rem; align-items: center; }
.input-row input {
    flex: 1; border: 1px solid #E5E7EB; border-radius: 6px;
    padding: 0.6rem 1rem; outline: none; font-size: 0.95rem;
    background-color: #F9FAFB; transition: 0.2s;
}
.input-row input:focus { border-color: var(--primary); background: white; }
.quick-options { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }

/* Grid de Tarefas (Lista) */
.lista-tarefas {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem; align-items: start;
}

/* Card da Tarefa */
.tarefa-item {
    background: var(--card-bg-normal); border: 1px solid var(--card-border-normal);
    padding: 1rem; border-radius: 8px;
    display: flex; flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s; cursor: pointer;
}
.tarefa-item:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.tarefa-item.card-urgente { background: var(--card-bg-urgente); border-color: var(--card-border-urgente); }
.tarefa-item.concluido { background: #F9FAFB; border-color: #E5E7EB; opacity: 0.8; }
.tarefa-item.concluido .titulo { text-decoration: line-through; color: #9CA3AF; }

.tarefa-header { display: flex; align-items: flex-start; gap: 1rem; width: 100%; }
.check-circle {
    width: 22px; height: 22px; border: 2px solid #93C5FD;
    border-radius: 50%; cursor: pointer; flex-shrink: 0; background: white;
    display: flex; align-items: center; justify-content: center;
}
.card-urgente .check-circle { border-color: #FCA5A5; }

.detalhes { flex: 1; min-width: 0; }
.detalhes .titulo { font-weight: 600; color: #1E3A8A; font-size: 1rem; }
.card-urgente .detalhes .titulo { color: #991B1B; }
.detalhes .meta { display: flex; gap: 0.5rem; margin-top: 0.4rem; font-size: 0.75rem; color: #64748B; align-items: center; flex-wrap: wrap; }
.badge-prazo { background: rgba(255,255,255,0.6); padding: 2px 8px; border-radius: 12px; font-weight: 600; border: 1px solid rgba(0,0,0,0.05); }
.prazo-riscado { text-decoration: line-through; color: #9CA3AF; font-size: 0.75rem; margin-right: 5px; }

/* Corpo Expansível (Tarefa) */
.tarefa-body { display: none; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.05); }
.tarefa-item.expandido .tarefa-body { display: block; animation: fadeIn 0.3s; }

/* Toolbar Compacta e Checklist */
.toolbar-compacta { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed #E5E7EB; flex-wrap: wrap; }
.toolbar-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: #4B5563; }

/* Estilo Melhorado para Inputs da Toolbar */
.mini-select, .mini-input {
    padding: 0.3rem 0.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: white;
    font-size: 0.85rem;
    color: #374151;
    outline: none;
    transition: border-color 0.2s;
}
.mini-select:focus, .mini-input:focus { border-color: var(--primary); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot-a_fazer { background: #9CA3AF; } .dot-fazendo { background: #F59E0B; } .dot-bloqueado { background: #EF4444; } .dot-feito { background: #10B981; }
.checklist-view { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.checklist-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: #374151; }
.checklist-row.feito span { text-decoration: line-through; color: #9CA3AF; }

/* Colaboração e Comentários */
.colaboracao-area { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; padding: 0.5rem; background: #F9FAFB; border-radius: 6px; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: #E0E7FF; color: var(--primary); font-size: 0.7rem; font-weight: bold; display: flex; align-items: center; justify-content: center; border: 2px solid white; margin-left: -8px; }
.btn-icon-text { background: none; border: 1px solid transparent; color: #6B7280; font-size: 0.8rem; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.comentarios-section { margin-top: 1rem; padding: 1rem; background: #FAFAFA; border-radius: 8px; }
.comentarios-titulo { font-size: 0.8rem; font-weight: 700; color: #6B7280; margin-bottom: 0.5rem; text-transform: uppercase; }
.lista-comentarios { display: flex; flex-direction: column; gap: 0.75rem; max-height: 200px; overflow-y: auto; margin-bottom: 0.5rem; }
.comentario-item { display: flex; gap: 0.5rem; font-size: 0.9rem; }

/* CORES DOS BALÕES DE COMENTÁRIOS */
.comentario-bubble { padding: 0.6rem 0.8rem; border-radius: 8px; max-width: 85%; line-height: 1.4; font-size: 0.9rem; color: #374151; border: 1px solid transparent; }
/* Meus comentários (Azul Claro) */
.comentario-item.meu { flex-direction: row-reverse; }
.comentario-item.meu .comentario-bubble { background-color: #E0F2FE; border-color: #BAE6FD; border-top-right-radius: 0; }
/* Outros usuários (Verde Claro) */
.comentario-item:not(.meu) .comentario-bubble { background-color: #DCFCE7; border-color: #BBF7D0; border-top-left-radius: 0; }

.form-comentario { display: flex; gap: 0.5rem; align-items: flex-end; }
/* TEXTAREA SEM RESIZE E COM ALTURA FIXA (scroll automático) */
.form-comentario textarea {
    flex: 1; border: 1px solid #D1D5DB; border-radius: 6px; padding: 0.5rem; 
    height: 38px; font-size: 0.9rem; resize: none; /* Bloqueia redimensionamento */
    overflow-y: auto; /* Scroll se necessário */
}
.btn-enviar { background: var(--primary); color: white; border: none; padding: 0 1rem; border-radius: 6px; cursor: pointer; height: 38px; }

/* ==========================================================================
   7. KANBAN BOARD (FLUTUANTE E MODERNO)
   ========================================================================== */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    height: calc(100vh - 220px); /* Ajuste para ocupar a tela */
    scroll-behavior: smooth;
}

.kanban-column {
    min-width: 280px;
    width: 300px;
    background: #F3F4F6;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    border: 1px solid #E5E7EB;
}

.kanban-header {
    padding: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: #4B5563;
    border-bottom: 1px solid #E5E7EB;
    background: #F9FAFB;
    border-top: 4px solid transparent; /* Cor definida inline no HTML */
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-count {
    background: #E5E7EB;
    color: #6B7280;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.kanban-body {
    padding: 0.8rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Cards Flutuantes do Kanban */
.kanban-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03); /* Sombra suave */
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    border-color: #E5E7EB;
}

.kanban-card:active {
    cursor: grabbing;
    opacity: 0.9;
}

/* Header dentro do Card (Título e Lápis) */
.kb-card-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.3rem;
}

.kb-titulo {
    font-weight: 600;
    color: #1F2937;
    font-size: 0.95rem;
    line-height: 1.4;
}

.kb-sub {
    font-size: 0.8rem;
    color: #6B7280;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.kb-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #F3F4F6;
}

/* Botão de Edição (Lápis) */
.btn-edit-kanban {
    font-size: 0.85rem;
    color: #9CA3AF;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
.btn-edit-kanban:hover {
    background: #EFF6FF;
    color: var(--primary);
}

/* CORREÇÃO: Classe específica para expandir no Kanban */
.kanban-card.expandido .tarefa-body {
    display: block; /* Garante que apareça */
    animation: fadeIn 0.3s;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #E5E7EB;
}

/* ==========================================================================
   8. MODAIS (CORRIGIDO PARA VISIBILIDADE)
   ========================================================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); 
    z-index: 2000; /* Acima de sidebar e header */
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.modal-overlay.open { 
    opacity: 1; visibility: visible; pointer-events: auto; 
}

.modal-content {
    background: white; width: 90%; max-width: 450px;
    border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    padding: 2rem; position: relative;
    transform: translateY(20px); transition: transform 0.3s ease;
    max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column;
}
.modal-overlay.open .modal-content { transform: translateY(0); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.btn-close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #9CA3AF; }

/* --- MODAL DE RESUMO (NOVO ESTILO) --- */
.summary-modal-content { text-align: center; max-width: 550px; }
.summary-greeting { font-size: 1.8rem; font-weight: 800; color: #1F2937; margin-bottom: 0.5rem; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.summary-card { background: #F9FAFB; padding: 1.5rem 1rem; border-radius: 12px; border: 1px solid #E5E7EB; }
.summary-number { font-size: 2.5rem; font-weight: 800; color: var(--primary); display: block; line-height: 1; margin-bottom: 0.5rem; }
.summary-label { font-size: 0.8rem; color: #6B7280; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* Item Seleção (Modal Membros) */
.item-selecao { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem; border-radius: 6px; border: 1px solid #F3F4F6; cursor: pointer; transition: background 0.1s; }
.item-selecao:hover { background: #F9FAFB; border-color: #E5E7EB; }
.item-selecao-label { display: flex; align-items: center; gap: 0.75rem; flex: 1; }
.perm-select { font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 4px; border: 1px solid #D1D5DB; display: none; }
.item-selecao.checked .perm-select { display: block; }

/* ==========================================================================
   9. CALENDÁRIO (AGENDA)
   ========================================================================== */
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.month-nav { display: flex; align-items: center; gap: 1rem; }
.month-nav h3 { font-size: 1.25rem; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #E5E7EB; border: 1px solid #E5E7EB; border-radius: 8px; overflow: hidden; }
.calendar-day-header { background: #F9FAFB; padding: 0.75rem; text-align: center; font-weight: 600; font-size: 0.85rem; color: #6B7280; }
.calendar-day { background: white; min-height: 120px; padding: 0.5rem; position: relative; display: flex; flex-direction: column; gap: 2px; }
.calendar-day.today { background: #EFF6FF; }
.calendar-day.other-month { background: #FAFAFA; color: #D1D5DB; }
.day-number { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; display: block; }
.today .day-number { color: var(--primary); background: #DBEAFE; display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; }
.event-pill { display: block; padding: 3px 6px; border-radius: 4px; font-size: 0.75rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid transparent; margin-bottom: 2px; }
.evt-lembrete { background: #F3E8FF; color: #6B21A8; border-left-color: #A855F7; }
.evt-tarefa { background: #E0F2FE; color: #0369A1; border-left-color: #0EA5E9; }
.btn-add-event { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: white; border: 1px solid #D1D5DB; border-radius: 50%; color: var(--primary); font-size: 14px; line-height: 18px; text-align: center; text-decoration: none; display: none; z-index: 10; }
.calendar-day:hover .btn-add-event { display: block; }

/* ==========================================================================
   10. NOTIFICAÇÕES E BUSCA
   ========================================================================== */
.search-bar-global { flex: 1; max-width: 400px; margin: 0 1.5rem; position: relative; }
.search-input { width: 100%; padding: 0.5rem 1rem; border-radius: 20px; border: 1px solid #E5E7EB; background: #F9FAFB; outline: none; font-size: 0.9rem; }
.search-results-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid #E5E7EB; border-radius: 8px; margin-top: 5px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); display: none; z-index: 100; max-height: 300px; overflow-y: auto; }
.search-result-item { padding: 10px; border-bottom: 1px solid #F3F4F6; cursor: pointer; display: block; }
.search-result-item:hover { background: #F9FAFB; }

.notification-wrapper { position: relative; }
.btn-notification { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #6B7280; position: relative; }
.notification-badge { position: absolute; top: -2px; right: -2px; background: #EF4444; color: white; font-size: 0.65rem; font-weight: bold; padding: 2px 5px; border-radius: 10px; border: 2px solid white; }
.notification-dropdown { position: absolute; top: 120%; right: 0; width: 300px; background: white; border: 1px solid #E5E7EB; border-radius: 8px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); z-index: 100; display: none; max-height: 400px; overflow-y: auto; }
.notification-dropdown.active { display: block; }
.notif-header { padding: 10px; border-bottom: 1px solid #eee; font-weight: bold; font-size: 0.9rem; background: #F9FAFB; }
.notif-item { padding: 10px; border-bottom: 1px solid #F3F4F6; cursor: pointer; font-size: 0.85rem; }
.notif-item:hover { background: #F9FAFB; }

/* ==========================================================================
   11. EDITOR DE TEXTO (ANOTAÇÕES)
   ========================================================================== */
.editor-container { background: #FFFFFF; display: flex; flex-direction: column; height: calc(100vh - 140px); border: 1px solid #E5E7EB; overflow: hidden; }
.editor-toolbar { padding: 0.5rem; background: #FFFFFF; border-bottom: 1px solid #F3F4F6; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: center; }
.toolbar-group { display: flex; gap: 4px; border-right: 1px solid #F3F4F6; padding-right: 0.5rem; margin-right: 0.5rem; align-items: center; }
.toolbar-btn { min-width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: 4px; cursor: pointer; color: #666; }
.toolbar-btn:hover { background: #F3F4F6; color: var(--primary); }
.editor-scroll-area { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; cursor: text; }
.editor-paper { width: 100%; max-width: 900px; min-height: 100%; padding: 3rem 2rem; }
.editor-title-input { width: 100%; font-size: 2rem; font-weight: 800; border: none; outline: none; margin-bottom: 1.5rem; }
.editor-content { outline: none; font-size: 1.1rem; line-height: 1.6; min-height: 300px; }
.editor-content table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.editor-content td, .editor-content th { border: 1px solid #E5E7EB; padding: 8px; }
.color-picker-wrapper { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; position: relative; cursor: pointer; border: 1px solid #E5E7EB; border-radius: 4px; }
.color-picker-wrapper input[type="color"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* AVISOS (MURAL) */
.avisos-container { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.aviso-card { background: linear-gradient(to right, #FFF7ED, #FFEDD5); border-left: 4px solid #F97316; padding: 1rem; border-radius: 6px; position: relative; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.aviso-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.aviso-titulo { font-weight: 700; color: #9A3412; font-size: 1rem; }
.aviso-meta { font-size: 0.75rem; color: #C2410C; margin-bottom: 0.5rem; }
.aviso-conteudo { color: #7C2D12; font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; }
.btn-fechar-aviso { background: none; border: none; color: #9A3412; font-size: 1.2rem; cursor: pointer; opacity: 0.6; }

/* BOTÃO RESUMO */
.btn-ver-resumo { background: none; border: 1px solid #E5E7EB; color: #6B7280; font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 12px; cursor: pointer; margin-left: 1rem; }
.btn-ver-resumo:hover { border-color: var(--primary); color: var(--primary); }

/* ==========================================================================
   12. RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); box-shadow: 2px 0 10px rgba(0,0,0,0.1); }
    .content { margin-left: 0; width: 100%; }
    body.menu-open .sidebar { transform: translateX(0); }
    body.menu-open .content { transform: translateX(0); } /* Overlay behavior */
    
    .btn-hamburger { display: block; }
    .top-bar { padding: 0 1rem; }
    .page-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
    
    .lista-tarefas { grid-template-columns: 1fr; }
    .calendar-day-header { display: none; }
    .calendar-grid { display: flex; flex-direction: column; gap: 0; }
    .calendar-day { min-height: auto; border-bottom: 1px solid #E5E7EB; padding: 1rem; }
    .calendar-day.other-month { display: none; }
    
    /* Tabs Scroll Mobile */
    .tabs-header { margin: 0 -1.5rem 1.5rem -1.5rem; padding: 0 1rem; }
    
    .search-bar-global { display: none; } /* Esconde busca no mobile por espaço */
    .summary-grid { grid-template-columns: 1fr; gap: 0.5rem; }
}