/* =========================================
   FONTES DE TEXTO OFFLINE (LOCAL)
========================================= */

/* Google Sans - Normal */
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700; /* Suporta de normal a negrito */
  font-display: swap;
  src: url('fonts/google-sans-regular.woff2') format('woff2');
}

/* Google Sans - Itálico */
@font-face {
  font-family: 'Google Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/google-sans-italic.woff2') format('woff2');
}

/* Inter - Normal */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900; /* Suporta de super fino a black */
  font-display: swap;
  src: url('fonts/inter-regular.woff2') format('woff2');
}

/* Inter - Itálico */
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-italic.woff2') format('woff2');
}
/* =========================================
   FONTES DE ÍCONES OFFLINE (LOCAL)
========================================= */

/* 1. Material Symbols Outlined */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  /* Aponta para a pasta fonts que criou */
  src: url('fonts/material-symbols-outlined.woff2') format('woff2');
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* 2. Material Icons Clássico */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  /* Aponta para a pasta fonts que criou */
  src: url('fonts/material-icons.woff2') format('woff2');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}

:root {
    --primary: #007AFF;
    --primary-hover: #0056b3;
    --bg-color: #F2F2F7;
    --surface-color: #FFFFFF;
    --text-main: #37474F;
    --text-muted: #78909C;
    --border-light: rgba(60, 60, 67, 0.12);
    --border-focus: #007AFF;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --success: #00C853;
    --warning: #FFC107;
    --danger: #FF3B30;
    --purple: #AF52DE;
    --blue: #5856D6;
    
    --google-blue: #4285F4;
    --google-gray-text: #3C4043;
    --google-gray-muted: #5F6368;
}

*, *::before, *::after { box-sizing: border-box; }

body, html { 
    margin: 0; padding: 0; height: 100%; 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-main); 
    overflow: hidden; 
    -webkit-font-smoothing: antialiased;
}

/* --- WRAPPER E LAYOUT PRINCIPAL --- */
.main-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* --- ESTILIZAÇÃO DO MENU ESQUERDO FIXO (SIDEBAR) --- */
.sidebar {
    width: 80px;
    height: 100vh;         /* Força a barra lateral a ocupar 100% da altura da janela */
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 16px;
    flex-shrink: 0;        /* Impede que o menu seja esmagado pelo conteúdo */
    z-index: 110;
    box-sizing: border-box; /* Garante que os paddings fiquem contidos no tamanho da barra */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
    overflow-y: auto;      /* Permite rolagem interna caso a tela do usuário seja muito baixa */
}

/* Logo minimalista no topo */
.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.sidebar-logo .material-icons {
    font-size: 26px;
    color: var(--primary);
}

.sidebar-logo .logo-text {
    font-family: "google sans";
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.4px;
}

/* Divisores de grupos com linha sutil */
.sidebar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-group:last-of-type {
    border-bottom: none; /* Remove a linha do último grupo */
}

.sidebar-group-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
    text-align: center;
}

/* Botões do Menu */
.sidebar-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    width: 64px;
    height: 58px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-btn:hover {
    background-color: rgba(0, 122, 255, 0.08);
    color: var(--primary);
}

.sidebar-btn .material-icons {
    font-size: 18px;
}

.sidebar-btn-label {
    font-size: 11px;
    font-weight: 500;
    font-family: "inter";
    white-space: nowrap;
    text-align: center;
}

/* --- CONTÊINER DO APLICATIVO (CONTEÚDO) --- */
.app-container { 
    display: flex; 
    flex-direction: column; 
    height: 100vh; 
    flex: 1;               /* Ocupa dinamicamente todo o espaço restante ao lado do menu */
    min-width: 0;          /* Impede que tabelas ou gráficos de Gantt quebrem a largura do contêiner */
}

input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: field; }

/* HEADER COMPACTO */
.header-fixed { 
    flex-shrink: 0; 
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 12px 24px 0 24px; 
    border-bottom: 1px solid var(--border-light); 
    z-index: 100; 
    display: flex; flex-direction: column; gap: 12px; 
}

.top-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

.title-group { display: flex; align-items: center; gap: 16px; flex: 1; }
.title-input-wrapper { display: flex; align-items: center; position: relative; }
.title-input { 
    font-size: 20px; font-weight: 700; color: var(--text-main); 
    border: 1px dashed transparent; background: transparent; 
    padding: 4px 8px; width: 100%; max-width: 350px; font-family: inherit; 
    border-radius: var(--radius-sm); transition: all 0.2s ease;
    margin-left: -8px;
}
.title-input:hover, .title-input:focus { background: rgba(0,0,0,0.04); outline: none; border-color: transparent; }
.edit-icon { color: var(--text-muted); font-size: 18px; margin-left: 2px; pointer-events: none; }

.action-group { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { 
    background: var(--surface-color); border: 1px solid var(--border-light); 
    color: var(--text-main); border-radius: var(--radius-sm); padding: 8px; 
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: var(--shadow-sm);
}
.icon-btn:hover { background: #F9F9FB; color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.icon-btn .material-icons { font-size: 18px; }

/* TABS */
.tabs-container { 
    display: flex; gap: 16px; margin-bottom: -1px; padding: 0; 
    overflow-x: auto; white-space: nowrap; padding-bottom: 4px;
}
.tabs-container::-webkit-scrollbar { height: 0; }
.tab-btn { 
    background: transparent; border: none; border-bottom: 2px solid transparent; 
    padding: 10px 4px; font-size: 13px; font-weight: 600; color: var(--text-muted); 
    cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* CONTENT AREA */
.content-area { flex-grow: 1; padding: 20px 24px; overflow: hidden; display: flex; flex-direction: column; }
.tab-content { display: none; height: 100%; flex-direction: column; }
.tab-content.active { display: flex; animation: tabFadeIn 0.3s ease-out; }
@keyframes tabFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* CONTÊINER COMPATÍVEL COM GOOGLE ADS E DASHBOARD INFERIOR */
.ads-bottom-wrapper {display: none !important; flex-shrink: 0; background-color: var(--surface-color); border-top: 1px solid var(--border-light);
    padding: 12px 24px; display: flex; justify-content: space-between; align-items: stretch; z-index: 90; gap: 20px; flex-wrap: wrap;
}
.dash-cards { 
    display: flex; 
    gap: 16px; 
    margin: 0; 
    flex-wrap: wrap; 
    align-content: center; 
}

.dash-card { 
    background: var(--surface-color); 
    padding: 14px 20px; 
    border-radius: var(--radius-md); 
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    min-width: 130px; 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
}

/* Detalhe de cor dinâmico na lateral (puxa a cor tema do usuário) */
.dash-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0px;
    background-color: var(--primary);
    opacity: 0.9;
}

/* Efeito de flutuação ao passar o mouse */
.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
    border-color: transparent;
}

.dash-label { 
    font-size: 10px; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    font-weight: 700; 
    letter-spacing: 0.6px; 
    z-index: 1; /* Garante que fique acima da barra de cor */
}

.dash-value { 
    font-size: 20px; 
    font-weight: 800; 
    color: var(--text-main); 
    letter-spacing: -0.5px;
    z-index: 1;
}

/* RECADOS CAROUSEL */
.recados-box {
    flex: 1; min-width: 250px; 
    background: var(--surface-color); 
    border: 1px solid var(--border-light);
    border-radius: 12px; 
    padding: 12px 20px; 
    display: flex; flex-direction: column;
    gap: 6px; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04); 
    position: relative; overflow: hidden; justify-content: center;
    transition: all 0.3s ease;
    height: 90px;
    max-height: 90px;
    box-sizing: border-box;
}
.recados-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px;
}
.recados-title {
    font-size: 11px; font-weight: 700; color: var(--text-muted); 
    text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center;
}
.recados-title .material-icons {
    color: #86868b; 
    font-size: 16px; margin-right: 6px;
}
.recados-content {
    font-size: 13px; color: var(--google-gray-text); font-weight: 500; height: 100%; position: relative; line-height: 1.4;
}
.recado-item {
    position: absolute; top: 0; left: 0; width: 100%; opacity: 0; 
    transition: opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1); 
    transform: translateY(6px); pointer-events: none; display: flex; align-items: flex-start; height: 100%;
}
.recado-item.active {
    opacity: 1; transform: translateY(0); pointer-events: auto;
}


/* ==========================================================================
REGRAS DE RESPONSIVIDADE MOBILE (TELAS MENORES QUE 1200PX E 768PX)
========================================================================== */

@media (max-width: 1200px) {
/* Altera imediatamente para coluna única, eliminando o estágio quebrado de 2 colunas */
.overview-three-columns {
grid-template-columns: 1fr; padding-bottom: 120px;
}

/* Empilha também os cards internos que estavam lado a lado na horizontal */
.overview-row-split {
    grid-template-columns: 1fr;
    gap: 16px;
}


}


/* GENERAL TABLES */
.gantt-outer { cursor: grab; }
.gantt-outer.is-panning { cursor: grabbing; }
.gantt-outer input, .gantt-outer select, .gantt-outer button, .gantt-outer textarea { cursor: auto; }
.gantt-outer .drag-handle { cursor: grab; }

.gantt-outer, .list-container { flex-grow: 1; min-height: 0; overflow: auto; background: var(--surface-color); border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); position: relative; }
.gantt-inner { position: relative; min-width: max-content; }

table { 
    border-collapse: separate; 
    border-spacing: 0; 
    min-width: 100%; 
    font-size: 13px; 
    table-layout: fixed; /* Força o alinhamento rígido das colunas */
}
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; background: var(--surface-color); }
td { color: var(--text-main); }

thead th { position: sticky; top: 0; z-index: 20; background-color: #F9F9FB; color: var(--text-muted); font-weight: 500; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid var(--border-light); backdrop-filter: blur(10px);}

th.day-col { 
    text-align: center; 
    min-width: 60px; 
    width: 60px; 
    padding: 6px 4px; 
    border-left: none !important; /* Visual limpo e minimalista */
    border-right: none !important; 
}
th.today-col { background-color: var(--primary) !important; border-bottom: none; border-radius: 4px 4px 0 0; }
td.today-col { background-color: rgba(0, 122, 255, 0.06) !important; border-left: 2px solid var(--primary) !important; border-right: 2px solid var(--primary) !important; }

/* ==============================================================
   CORREÇÃO DEFINITIVA DAS COLUNAS STICKY (GANTT)
============================================================== */
.sticky-col { 
    position: -webkit-sticky !important; /* Suporte extra para Safari */
    position: sticky !important; 
    z-index: 100 !important; 
    background-color: var(--surface-color) !important; 
    background-clip: padding-box !important; /* Impede o solavanco na renderização da borda */
}

th.sticky-col { 
    z-index: 200 !important; 
    background-color: #F9F9FB !important; 
    background-clip: padding-box !important;
}

/* Configuração de Larguras e Posições das Colunas Fixas (Desktop) */
/* Regra Matemática: left da coluna = left + width da coluna anterior */

.col-1 { left: 0; width: 400px; min-width: 400px; max-width: 400px; text-align: center; }

/* A col-2 foi padronizada rigidamente em 140px para acomodar datas sem flutuar */
.col-2 { left: 400px; width: 140px; min-width: 140px; max-width: 140px; text-align: center; } 

/* 400 + 140 = 540 */
.col-3 { left: 540px; width: 90px; min-width: 90px; max-width: 90px; text-align: center; } 

/* 540 + 90 = 630 */
.col-4 { left: 630px; width: 140px; min-width: 140px; max-width: 140px; text-align: center; } 

/* 630 + 140 = 770 */
.col-5 { 
    left: 770px; 
    width: 50px; 
    min-width: 50px; 
    max-width: 50px; 
    text-align: left; 
    padding-left: 12px;
    border-right: 1px solid rgba(60, 60, 67, 0.2) !important; 
}

.task-name-content { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.task-name-input { flex: 1; border: 1px solid transparent; background: transparent; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-main); padding: 6px; border-radius: var(--radius-sm); min-width: 120px; transition: all 0.2s; }
.task-name-input:hover, .task-name-input:focus { background: rgba(0,0,0,0.04); outline: none; }

.btn-subtasks { background: #F2F2F7; border: none; color: var(--primary); font-size: 12px; padding: 6px 10px; border-radius: 20px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: background 0.2s; display: flex; align-items: center; }
.btn-subtasks:hover { background: #E5E5EA; }

/* Remove totalmente o ícone de calendário nativo e botões extras do input de data */
.date-input::-webkit-calendar-picker-indicator {
    display: none !important;
    -webkit-appearance: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
}
.date-input::-webkit-inner-spin-button,
.date-input::-webkit-clear-button {
    display: none !important;
    -webkit-appearance: none !important;
}

.date-input, .dep-select { width: 100%; padding: 6px 4px; border: 1px solid transparent; border-radius: var(--radius-sm); text-align: center; font-size: 12px; font-weight: 600; color: var(--text-main); background: transparent; font-family: inherit; transition: all 0.2s; cursor: pointer; }
.date-input:hover, .dep-select:hover { background: rgba(0,0,0,0.04); }
.date-input:focus, .dep-select:focus { background: #fff; border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); }

.delete-btn { background-color: transparent; color: var(--danger); border: none; padding: 6px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; transition: background 0.2s; display: inline-flex; align-items: center; justify-content: center; }
.delete-btn:hover { background-color: #FFEBEA; }

.badge { display: inline-block; padding: 4px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; background: #F2F2F7; color: var(--text-muted); }

.drag-handle { 
    cursor: grab; 
    color: #C7C7CC; 
    padding-right: 5px; 
    font-size: 16px; 
    user-select: none; 
    transition: color 0.2s ease;
}
.drag-handle:hover {
    color: var(--primary) !important;
}
.drag-handle:active { 
    cursor: grabbing; 
}

/* Efeito visual nas linhas ao arrastar (Gantt e Itens de Compra) */
tr.dragging, tr.item-dragging { 
    opacity: 0.35; 
    background-color: rgba(0, 0, 0, 0.02) !important;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

/* Linhas e bordas indicativas para inserção de precisão (Cima/Baixo) */
tr.drop-above td {
    border-top: 2px solid var(--primary) !important;
    background-color: rgba(0, 122, 255, 0.04) !important;
    transition: border-color 0.1s ease-in-out;
}
tr.drop-below td {
    border-bottom: 2px solid var(--primary) !important;
    background-color: rgba(0, 122, 255, 0.04) !important;
    transition: border-color 0.1s ease-in-out;
}

.bar-cell { 
    padding: 4px 0px; 
    text-align: center; 
    background-color: #F9F9FB; 
    border-left: none !important; /* Remove divisórias verticais internas do Gantt (Visual Clean) */
    border-right: none !important;
}

.gantt-bar-solid {
    height: 24px; color: white; font-weight: 700; font-size: 10px; display: flex; align-items: center; padding-left: 10px; position: absolute; top: 50%; left: 0; transform: translateY(-50%); border-radius: 50px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: transform 0.2s, box-shadow 0.2s; z-index: 5; box-sizing: border-box; overflow: hidden; white-space: nowrap; cursor: default;
}
.gantt-bar-solid:hover { transform: translateY(-50%) scaleY(1.15); box-shadow: 0 4px 8px rgba(0,0,0,0.15); z-index: 10; }
#gantt-lines { position: absolute; top: 0; left: 0; z-index: 15; pointer-events: none; overflow: visible; }

.action-input {
    height: 38px; box-sizing: border-box; border-radius: var(--radius-sm); border: 1px solid var(--border-light);
    padding: 0 12px; font-size: 13px; background: #FFFFFF; font-family: inherit; color: var(--text-main); transition: all 0.2s; outline: none;
}
.action-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); }

.btn-sm-primary { 
    height: 38px; box-sizing: border-box; padding: 0 16px; font-size: 13px; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); font-family: inherit; background: var(--primary); color: white; box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3); white-space: nowrap; 
}
.btn-sm-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4); }

.btn-sm-secondary { 
    height: 38px; box-sizing: border-box; padding: 0 16px; font-size: 13px; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); font-family: inherit; background: #E5E5EA; color: var(--text-main); white-space: nowrap; 
}
.btn-sm-secondary:hover { background: #D1D1D6; transform: translateY(-1px); }

.add-task-footer { flex-shrink: 0; display: flex; gap: 12px; align-items: center; background: #F9F9FB; padding: 4px 20px; border-radius: var(--radius-md); border: 1px solid var(--border-light); margin: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: none; justify-content: center; align-items: center; z-index: 200; }
.modal-content { background: var(--surface-color); width: 600px; max-width: 95%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; transform: scale(0.95); animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes modalPop { to { transform: scale(1); } }

/* Modais Refatorados: Sem tarja cinza e sem borda */
.modal-header { background: var(--surface-color); color: var(--text-main); padding: 24px 24px 12px 24px; font-size: 18px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; border-bottom: none; }
.modal-body { padding: 0; display: flex; flex-direction: column; max-height: 60vh; background: var(--surface-color); }
.modal-footer { padding: 16px 24px 24px 24px; background: var(--surface-color); border-top: none; display: flex; justify-content: flex-end; gap: 12px; }

/* Modal Form CSS */
.form-group { display: flex; flex-direction: column; margin-bottom: 12px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.form-group input, .form-group select { border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; font-family: inherit; background: var(--surface-color); transition: all 0.2s; box-sizing: border-box;}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); }
.form-group textarea { border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; font-family: inherit; background: var(--surface-color); transition: all 0.2s; resize: vertical; box-sizing: border-box;}
.form-group textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); }

.subtask-list { width: 100%; border-collapse: separate; border-spacing: 0; }
.subtask-list thead th { position: sticky; top: 0; z-index: 10; background: var(--surface-color); color: var(--text-muted); font-size: 11px; padding: 16px 8px 8px 8px; border: none; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 1px 0 var(--border-light); }
.subtask-list td { padding: 8px; border-bottom: 1px solid var(--border-light); }
.subtask-row input[type="text"], .subtask-row input[type="number"] { width: 100%; padding: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; background: rgba(0,0,0,0.02); transition: all 0.2s; }
.subtask-row input[type="text"]:focus, .subtask-row input[type="number"]:focus { background: var(--surface-color); border-color: var(--primary); outline: none; }

/* Nova Área Minimalista de Adicionar Subatividade */
.add-sub-box { 
    display: flex; 
    gap: 10px; 
    background: transparent; 
    padding: 16px 0 0 0; 
    border: none; 
    border-top: 1px solid var(--border-light); 
    border-radius: 0; 
    align-items: center; 
}

.cell-input { width: 100%; border: 1px solid transparent; background: var(--surface-color); font-family: inherit; font-size: 13px; color: var(--text-main); padding: 8px; border-radius: var(--radius-sm); box-sizing: border-box; transition: all 0.2s; }
.cell-input:hover { background: rgba(0,0,0,0.02); }
.cell-input:focus { background: var(--surface-color); border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); }
.cell-input.right-align { text-align: right; }
.cell-input.center-align { text-align: center; }

/* Grid sizes */
.srv-col-1 { width: 50%; } 
.srv-col-2 { width: 20%; } 
.srv-col-3 { width: 10%; text-align: right !important;} 
.srv-col-4 { width: 10%; text-align: right !important;} 
.srv-col-5 { width: 10%; text-align: center !important;} 

.cmp-col-1 { width: 25%; } 
.cmp-col-2 { width: 8%; text-align: center !important;} 
.cmp-col-3 { width: 35%; } 
.cmp-col-4 { width: 10%; text-align: right !important;} 
.cmp-col-5 { width: 10%; text-align: right !important;} 
.cmp-col-6 { width: 10%; text-align: right !important;} 
.cmp-col-9 { width: 2%; text-align: center !important;} 

.prof-col-1 { width: 25%; } 
.prof-col-2 { width: 20%; } 
.prof-col-5 { width: 15%; text-align: center !important;} 
.prof-col-3 { width: 34%; } 
.prof-col-4 { width: 6%; text-align: center !important; }

.currency-symbol { color: var(--text-muted); font-size: 12px; margin-right: 4px; font-weight: 600;}

/* ESTILO E ANIMAÇÃO DOS CARDS DE CATEGORIA */
.cat-card { 
    border: 1px solid var(--border-light); 
    border-radius: var(--radius-md); 
    margin-bottom: 16px; 
    background: var(--surface-color); 
    overflow: hidden; 
    box-shadow: var(--shadow-sm); 
    flex-shrink: 0; 
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}
.cat-card:hover { box-shadow: var(--shadow-md); }

.cat-card.dragging { 
    opacity: 0.4; 
    transform: scale(0.97); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Indicadores de inserção de precisão para Cards */
.cat-card.drop-above { 
    border-top: 3px solid var(--primary) !important;
    background-color: rgba(0, 122, 255, 0.02) !important;
    transform: translateY(-2px);
    transition: border-color 0.1s ease-in-out;
}
.cat-card.drop-below { 
    border-bottom: 3px solid var(--primary) !important;
    background-color: rgba(0, 122, 255, 0.02) !important;
    transform: translateY(2px);
    transition: border-color 0.1s ease-in-out;
}

.cat-header { background: #F9F9FB; padding: 16px 20px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid transparent; transition: background 0.2s; }
.cat-header:hover { background: #F2F2F7; }
.cat-content.open .cat-header { border-bottom-color: var(--border-light); }
.cat-content { display: none; }
.cat-content.open { display: block; animation: appear 0.2s ease-in; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
.cat-content .data-table { border: none; border-radius: 0; margin: 0; box-shadow: none;}

.shopping-global-totals { flex-shrink: 0; margin-top: 16px; background: var(--surface-color); border-radius: var(--radius-md); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }

/* ESTILO DOS CARDS TOTAIS (RODAPÉ) */
.totals-group { display: flex; gap: 16px; align-items: center; flex: 1; justify-content: flex-end;}
.total-item { 
    display: flex; align-items: center; gap: 12px; 
    background: #F9F9FB; padding: 10px 16px; 
    border-radius: var(--radius-md); border: 1px solid var(--border-light); 
}
.total-item.highlight { 
    background: rgba(0, 122, 255, 0.05); 
    border-color: rgba(0, 122, 255, 0.2); 
}
.total-item.highlight .total-value { color: var(--primary); }
.total-icon { 
    display: flex; align-items: center; justify-content: center; 
    width: 38px; height: 38px; border-radius: 50%; 
    background: var(--surface-color); box-shadow: var(--shadow-sm); 
    color: var(--text-muted); 
}
.total-item.highlight .total-icon { color: var(--primary); }
.total-text { display: flex; flex-direction: column; text-align: left; }
.total-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 2px; font-weight: 700; letter-spacing: 0.5px; }
.total-value { font-size: 16px; font-weight: 800; color: var(--text-main); line-height: 1.2; }

/* CSS for Slider Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #E5E5EA; transition: .3s; border-radius: 22px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 2px; bottom: 2px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.switch input:checked + .slider { background-color: var(--success); }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* CONFIGURAÇÃO DE IMPRESSÃO APRIMORADA */
.print-only { display: none; }
@media print { 
    body, html { height: auto !important; overflow: visible !important; background: white !important; }
    .app-container, .modal-overlay, .sidebar, .main-layout { display: none !important; } 
    
    .print-only { display: block !important; position: static !important; background: white; width: 100%; }
    
    .print-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 11pt; font-family: 'Inter', Arial, sans-serif; color: #1D1D1F; } 
    .print-table th, .print-table td { border: none; border-bottom: 1px solid #E5E5EA; padding: 12px 8px; text-align: left; vertical-align: middle; } 
    .print-table th { background-color: transparent !important; font-weight: 700; color: #86868B; text-transform: uppercase; font-size: 9pt; letter-spacing: 0.5px; border-bottom: 1px solid #1D1D1F; } 
    
    @page { margin: 2.5cm; } 
}

/* Rolagem vertical fixa do cabeçalho duplo e alinhamento do "gap" */
#monthRow {
    height: 26px;
}
#monthRow th {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 26px;
    padding: 0 !important;
    line-height: 26px;
}
#monthRow th.sticky-col {
    z-index: 50; /* Z-Index maior para as colunas fixas da esquerda */
}
#dayRow {
    height: 32px;
}
#dayRow th {
    position: sticky;
    top: 26px; /* Altura calculada estritamente da primeira linha, eliminando qualquer fresta */
    z-index: 39;
    height: 32px;
    padding: 4px 0 !important;
    border-bottom: 1px solid var(--border-light) !important;
}

/* Título Editável no modal de detalhamento */
.modal-title-input {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    border: 1px dashed transparent;
    background: transparent;
    padding: 4px 8px;
    width: 100%;
    max-width: 400px;
    font-family: inherit;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    margin-left: -8px;
}
.modal-title-input:hover, .modal-title-input:focus {
    background: rgba(0,0,0,0.04);
    outline: none;
    border-color: transparent;
}

/* Card de Boas-vindas para Estado Vazio (Zero tarefas) */
#gantt-placeholder {
    background: var(--surface-color);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

/* ==========================================================================
   ESTILIZAÇÃO DA VISÃO GERAL (DASHBOARD)
   ========================================================================== */

.overview-grid-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden; /* Trava totalmente o movimento lateral no celular */
    padding-bottom: 24px;
    height: 100%;
    width: 100%;
}

/* Organização em Três Colunas Paralelas (Tempo, Dinheiro Métricas e Dinheiro Gráfico) */
.overview-three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.overview-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Organização em duas sub-colunas internas e responsivas para splits */
.overview-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    align-items: stretch;
}

.overview-column-sub {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: space-between;
}

.overview-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.overview-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Força os ícones de cabeçalhos que precedem os rótulos a ficarem cinzas estáticos */
.overview-card-header .material-icons {
    color: var(--text-muted) !important;
    font-size: 20px;
}

.overview-card-header h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    justify-content: center;
}

.overview-huge-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.overview-progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: var(--bg-color);
    border-radius: 3px;
    overflow: hidden;
}

.overview-progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.overview-card-sub {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.overview-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

.overview-badge.danger {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--danger);
}

/* Bloco de Alertas de Ação */
.overview-alert-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.overview-alert-card.warning {
    border-left: 12px solid color-mix(in srgb, var(--warning) 50%, transparent);
}

.overview-alert-card.warning .material-icons {
    color: var(--warning);
    background-color: rgba(255, 149, 0, 0.1);
}

.overview-alert-card.info {
    border-left: 12px solid color-mix(in srgb, var(--primary) 50%, transparent);
}

.overview-alert-card.info .material-icons {
    color: var(--primary);
    background-color: rgba(0, 122, 255, 0.1);
}

.overview-alert-card .material-icons {
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
}

.overview-alert-card div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.overview-alert-card h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.overview-alert-card p {
    margin: 0;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Card Financeiro e Donut */
.overview-financial-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.overview-financial-card h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: none; /* Remoção de fios divisores (Passo III) */
    padding-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.financial-composition-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.financial-comp-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-color);
}

.financial-comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.financial-comp-pct {
    font-size: 11px;
    color: var(--text-muted);
    background-color: var(--surface-color);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.financial-comp-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-main);
}

.financial-comp-prev {
    color: var(--text-muted);
}

.chart-card {
    align-items: stretch;
}

.chart-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px; 
    width: 100%;
    max-width: 100%;
    min-width: 0; /* Permite que o contêiner do gráfico encolha sob o CSS Grid/Flexbox */
    overflow: hidden; /* Corta qualquer excesso visual do canvas */
}

/* Ajuste específico para o Card de Recados embutido no Dashboard */
.recados-card {
    min-height: 110px;
}

.recados-card .recados-content {
    min-height: 50px;
    position: relative;
}

/* ==========================================================================
REGRAS DE RESPONSIVIDADE MOBILE (TELAS MENORES QUE 1200PX E 768PX)
========================================================================== */

/* ==========================================================================
   REORGANIZAÇÃO DE RESPONSIVIDADE E BREAKPOINTS (UI REVIEW)
   ========================================================================== */

/* --------------------------------------------------------------------------
   A) COMPORTAMENTO DE TELAS INTERMEDIÁRIAS (Tablet na Horizontal e Desktops Menores)
   Mantém a visão normal completa, mas evita o estiramento de 1 coluna.
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) and (min-width: 1025px), (max-width: 1366px) and (orientation: landscape) {
    /* Em vez de quebrar direto para 1 coluna e esticar o conteúdo,
       utilizamos 2 colunas para manter a elegância visual no tablet deitado */
    .overview-three-columns {
        grid-template-columns: repeat(2, 1fr);
        padding-bottom: 120px;
    }
    
    /* Faz o último painel ocupar a largura total do grid inferior */
    .overview-column:last-of-type {
        grid-column: span 2;
    }
    
    .overview-row-split {
        grid-template-columns: 1fr 1fr;
    }
}

/* --------------------------------------------------------------------------
   B) COMPORTAMENTO EXCLUSIVO DA VERSÃO RESUMIDA
   Esta regra unifica e isola os cenários onde APENAS a "Visão Geral" deve aparecer:
   1. Qualquer dispositivo em modo RETRATO até 1024px de largura (Celulares e Tablets Verticais, incluindo iPad Pro).
   2. Celulares na HORIZONTAL (telas deitadas de tamanho pequeno).
   3. Telas com altura muito baixa (evitando quebras de interface).
   -------------------------------------------------------------------------- */
@media 
  /* 1. Telas em modo retrato até 1024px de largura */
  (max-width: 1024px) and (orientation: portrait),
  
  /* 2. Celulares deitados (telas landscape com largura até 950px e altura menor que 500px) */
  (max-width: 950px) and (orientation: landscape) and (max-height: 500px),
  
  /* 3. Prevenção para telas muito baixas */
  (max-width: 950px) and (max-height: 500px)
{
    /* Ajustes Gerais de Layout */
    .header-fixed {
        padding: 8px 12px 0 12px;
        gap: 8px;
    }
    
    .content-area {
        padding: 12px;
    }

    .title-input {
        font-size: 16px;
        max-width: 100% !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    .edit-icon {
        font-size: 16px;
    }

    /* ESCONDE AS ABAS DO TOPO (Força o usuário a usar apenas a Visão Geral) */
    .tabs-container {
        display: none !important;
    }

    /* ESCONDE O CONTEÚDO DAS OUTRAS ABAS */
    .tab-content {
        display: none !important;
    }

    /* EXIBE APENAS A VISÃO GERAL */
    #tab-visao-geral {
        display: flex !important;
    }

    /* Oculta o grupo de ações que não condiz com o dashboard simplificado */
    .action-group {
        display: none !important;
    }

    /* Ajustes do Grid Interno da Visão Geral (Força 1 coluna apenas no modo resumido) */
    .overview-three-columns {
        grid-template-columns: minmax(0, 1fr) !important; /* minmax(0, ...) impede o vazamento horizontal */
        width: 100%;
    }

    .overview-column:last-of-type {
        grid-column: span 1 !important;
    }

    .overview-row-split {
        grid-template-columns: minmax(0, 1fr) !important; /* Garante que os cartões divididos também encolham */
        gap: 12px;
        width: 100%;
    }

    /* Ajustes de rodapé e cards inferiores no modo resumido */
    .add-task-footer {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin: 8px 0;
    }
    
    .add-task-footer > div {
        border-left: none !important;
        padding-left: 0 !important;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .add-task-footer input[type="date"] {
        width: 100%;
        box-sizing: border-box;
    }

    .ads-bottom-wrapper {
        display: none !important;
    }

    .dash-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
        order: 1;
    }

    .dash-card {
        min-width: 0;
        padding: 6px 10px;
    }

    .dash-value {
        font-size: 14px;
    }

    .recados-box {
        order: 2;
        width: 100%;
        height: auto;
        min-height: 70px;
        max-height: none;
    }

    /* --- REALOCAÇÃO DO MENU LATERAL PARA O RODAPÉ --- */
    /* --- REALOCAÇÃO DO MENU LATERAL PARA O RODAPÉ --- */
    .main-layout {
        flex-direction: column;
        padding-bottom: 70px; /* Garante que o conteúdo não fique sob o menu */
    }
    
    .sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 65px !important;
        flex-direction: row !important;
        padding: 0 16px !important; /* Espaço nas pontas para o primeiro e último botão */
        gap: 16px !important; /* Espaço de respiro entre os grupos de botões */
        justify-content: flex-start !important; /* Alinha no início para a rolagem fluir naturalmente */
        border-right: none !important;
        border-top: 1px solid var(--border-light) !important;
        background: var(--surface-color) !important;
        z-index: 1000 !important;
        
        /* ATIVAÇÃO DA ROLAGEM HORIZONTAL POR TOQUE */
        overflow-x: auto !important; 
        overflow-y: hidden !important; 
        flex-wrap: nowrap !important; /* Impede os grupos de quebrarem linha */
        -webkit-overflow-scrolling: touch; /* Garante rolagem suave e com inércia no iOS/Safari */
        
        /* Oculta as barras visuais de rolagem para parecer um app nativo */
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE/Edge */
    }

    /* Oculta a barra de rolagem visual nos navegadores baseados em Webkit (Chrome/Safari/Opera) */
    .sidebar::-webkit-scrollbar {
        display: none !important;
    }
    
    .sidebar-logo {
        display: none;
    }
    
    .sidebar-group {
        display: flex !important;
        flex-direction: row !important;
        width: auto !important; /* Permite que o grupo tenha a largura natural de seus botões */
        justify-content: flex-start !important;
        gap: 8px !important; /* Espaçamento interno entre botões do mesmo grupo */
        padding: 0;
        margin: 0;
        border-bottom: 0;
        flex-shrink: 0 !important; /* Impede o grupo de ser esmagado pelo container principal */
    }
    
    .sidebar-btn {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: auto !important;
        min-width: 64px !important; /* Largura mínima ideal para o toque com o dedo */
        height: 100%;
        padding: 0 10px;
        flex-shrink: 0 !important; /* Impede os botões individuais de reduzirem de tamanho */
    }
    
    .sidebar-btn-label {
        font-size: 9px;
        margin-top: 2px;
    }
    
    .sidebar-group-title {
        display: none;
    }
}

/* ============== */

/* Estilo para o rótulo fixo abaixo do título do projeto */
.project-subtitle-label {
    font-family: "google sans";
    text-transform: uppercase;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 13px;
    font-weight: 500;
    letter-spacing: 1px; /* Mantém o padrão estético do restante do Planner */
}

/* Estilo para edição de títulos nas categorias (Accordion) */
.cat-title-input {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    padding: 4px 8px;
    margin-left: -8px; /* Compensa o padding para manter o alinhamento original */
    border-radius: 6px;
    width: 100%;
    max-width: 350px;
    outline: none;
    transition: all 0.2s ease;
}

.cat-title-input:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--border-light);
}

.cat-title-input:focus {
    background: var(--surface-color);
    border: 1px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}
/* ==========================================================================
   BLOCO PROMOCIONAL PREMIUM (HEADER)
   ========================================================================== */

.promo-header-block {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(to right, rgba(175, 82, 222, 0.04), rgba(88, 86, 214, 0.04));
    padding: 6px 6px 6px 20px;
    border-radius: 30px;
    border: 1px solid rgba(175, 82, 222, 0.15);
}

.promo-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 250px;
    text-align: right;
}

.promo-text b {
    color: var(--text-main);
    display: block;
    font-size: 14px;
}

/* --- Botão Promocional Premium --- */
.btn-promo-cta {
    /* Gradiente partindo do azul tema (#007AFF) para um tom premium (#AF52DE ou #5856D6) */
    background: linear-gradient(135deg, #007AFF, #007AFF);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3); /* Sombra ajustada para o tom azul */
    white-space: nowrap;
    animation: premium-pulse 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-promo-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.45); /* Sombra do hover ajustada para o azul */
    filter: brightness(1.05);
    animation: none;
}

/* --- Animação de Pulso Suave com Pausa --- */
@keyframes premium-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
    }
    5% {
        transform: scale(1.04); /* Cresce sutilmente */
        box-shadow: 0 6px 18px rgba(88, 86, 214, 0.6); /* Brilho mais intenso */
    }
    10% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
    }
    15% {
        transform: scale(1.04); /* Segundo pulso duplo rápido */
        box-shadow: 0 6px 18px rgba(88, 86, 214, 0.6);
    }
    20% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
    }
    100% {
        /* Fica estático do 20% ao 100% do tempo (gera a pausa de repouso) */
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
    }
}



/* ==========================================================================
   MODAL DE TERMOS E POLÍTICAS DE PRIVACIDADE
   ========================================================================== */
.legal-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.legal-tab-btn:hover {
    color: var(--primary);
    background: rgba(0, 122, 255, 0.03);
}

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

.legal-content-box h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    margin: 32px 0 12px 0;
}

.legal-content-box p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.legal-content-box ul {
    margin-bottom: 24px;
    padding-left: 24px;
}

.legal-content-box li {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 6px;
    list-style-type: disc;
}

/* 1. Botões de Ação (Fundo e Sombra Dinâmicas) */
.btn-sm-primary, 
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    /* Substitui a antiga sombra azul fixa por 30% da cor atual misturada com transparente */
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent) !important;
    transition: all 0.2s ease !important;
}

.btn-sm-primary:hover, 
.btn-primary:hover {
    /* Mistura 15% de preto na cor principal para escurecer o fundo com perfeição */
    background-color: color-mix(in srgb, var(--primary) 85%, black) !important;
    border-color: color-mix(in srgb, var(--primary) 85%, black) !important;
    /* Intensifica a sombra no hover usando 40% da cor atual */
    box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 40%, transparent) !important;
    transform: translateY(-1px);
}

/* 2. Menu Esquerdo (Background suave e ícones coloridos no Hover e Ativo) */
.sidebar-btn:hover {
    background-color: color-mix(in srgb, var(--primary) 10%, transparent) !important; 
    color: var(--primary) !important;
}

.sidebar-btn:hover .material-icons,
.sidebar-btn:hover .material-symbols-outlined {
    color: var(--primary) !important;
}

.sidebar-btn.active {
    background-color: color-mix(in srgb, var(--primary) 15%, transparent) !important;
    color: var(--primary) !important;
    border-right: 3px solid var(--primary) !important;
}

.sidebar-btn.active .material-icons,
.sidebar-btn.active .material-symbols-outlined {
    color: var(--primary) !important;
}

/* 3. Coluna "Hoje" no Calendário / Cronograma */
th.today-col {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

td.today-col {
    background-color: color-mix(in srgb, var(--primary) 8%, transparent) !important;
}

/* 4. Títulos coloridos nas abas de Termos/Políticas */
.legal-tab-btn.active {
    color: var(--primary) !important;
    border-bottom: 3px solid var(--primary) !important;
}
.legal-tab-btn:hover {
    color: var(--primary) !important;
    background-color: color-mix(in srgb, var(--primary) 5%, transparent) !important;
}

/* ==========================================================================
   BOTÃO FLAT (TIPOGRÁFICO) - ADICIONAR NOVO ITEM
   ========================================================================== */
.btn-flat-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    outline: none;
}

.btn-flat-add:hover {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
}

.btn-flat-add .material-symbols-outlined {
    font-size: 18px;
}

/* ==============================================================
   FECHAR AS FRESTAS (JANELAS) ENTRE AS LINHAS FIXAS
============================================================== */
#ganttTable th.sticky-col, 
#ganttTable td.sticky-col {
    /* 1. Transforma a borda física de 1px numa "parede" sólida com a mesma cor do fundo.
          Isto tapa completamente qualquer fresta ou janela transparente. */
    border-bottom: 1px solid var(--surface-color) !important;
    
    /* 2. Recria a linha divisória visual por cima da parede sólida.
          Como é 'inset', é desenhada por cima do fundo opaco e nunca deixa vazar o que está atrás. */
    box-shadow: inset 0 -2px 0 -1px var(--border-light) !important;
}


/* =========================================
   AVISO DE GANTT NO CELULAR
========================================= */
.mobile-warning-msg {
    display: none; /* Invisível no PC */
    text-align: center;
    padding: 60px 20px;
    background: var(--surface-color);
    border: 1px dashed var(--border-light);
    border-radius: 12px;
    margin: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}