/*
Theme Name: Cronos App
Theme URI: https://cronos.jzprint.com.br
Author: JZPrint
Description: Dashboard customizado para gestão de Orçamentos e OS da Gráfica Cronos.
Version: 1.0
Text Domain: cronos-app
*/

:root {
    --cronos-laranja: #E5BB35;
    --cronos-cinza: #7C7B7C;
    --bg-app: #191E24;
    --bg-sidebar: #1F252E;
    --bg-panel: #262D35;
    --bg-input: #12161A;
    --text-principal: #FFFFFF;
    --text-secundario: #A0AAB5;
    --border-color: #333C47;
    --status-producao: #2A7942;
    --status-analise: #E5BB35;
    --card-blue: #205994;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background-color: var(--bg-app); color: var(--text-principal); }

/* Layout Base */
.app-container { display: flex; height: 100vh; overflow: hidden; }

/* Menu Lateral */
.sidebar { width: 250px; background-color: var(--bg-sidebar); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 20px 0; }
.logo-container { padding: 0 20px 30px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.logo { max-width: 100%; height: auto; }
.sidebar-menu { display: flex; flex-direction: column; flex-grow: 1; padding: 0 20px; }
.menu-item { color: var(--text-secundario); text-decoration: none; padding: 12px 15px; margin-bottom: 8px; border-radius: 6px; font-weight: 500; }
.menu-item:hover, .menu-item.active { background-color: var(--bg-panel); color: var(--cronos-laranja); }

/* Conteúdo Principal */
.main-content { flex-grow: 1; padding: 30px 40px; overflow-y: auto; }

/* Topo */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.user-greeting { font-size: 1.2rem; font-weight: 600; }
.search-bar input { background-color: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-principal); padding: 10px 15px; border-radius: 20px; width: 300px; outline: none; }

/* Cards */
.dashboard-cards { display: flex; gap: 20px; margin-bottom: 30px; }
.card { flex: 1; padding: 20px; border-radius: 10px; display: flex; flex-direction: column; justify-content: center; }
.card-title { font-size: 0.9rem; margin-bottom: 10px; font-weight: 500; }
.card-value { font-size: 2rem; font-weight: 700; }
.card-orange { background-color: var(--cronos-laranja); color: #12161A; }
.card-dark { background-color: var(--bg-panel); border: 1px solid var(--border-color); }
.card-blue { background-color: var(--card-blue); }

/* Tabela */
.table-container { background-color: var(--bg-panel); padding: 20px; border-radius: 10px; }
.table-container h3 { margin-bottom: 20px; font-size: 1.1rem; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { color: var(--text-secundario); font-weight: 500; padding: 12px 10px; border-bottom: 1px solid var(--border-color); }
.data-table td { padding: 15px 10px; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; }
.badge { padding: 5px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.badge-green { background-color: var(--status-producao); color: white; }
.badge-orange { background-color: var(--status-analise); color: #12161A; }

/* Efeito de clique na Tabela */
.data-table tbody tr { cursor: pointer; transition: background-color 0.2s; }
.data-table tbody tr:hover { background-color: rgba(255, 255, 255, 0.05); }

/* Painel Lateral Direito (Detalhes e Observações) */
.details-panel {
    width: 380px; 
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    padding: 25px;
    display: none; /* Começa escondido */
    flex-direction: column;
    overflow-y: auto;
}

/* Classe que o JavaScript vai usar para mostrar o painel */
.details-panel.open {
    display: flex; 
}

.panel-header { margin-bottom: 25px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.panel-header h3 { font-size: 1.05rem; color: var(--text-principal); }

.panel-section { background-color: var(--bg-panel); padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.panel-section h4 { font-size: 0.9rem; margin-bottom: 10px; color: var(--text-secundario); font-weight: 500; }
.panel-section p { font-size: 0.85rem; margin-bottom: 6px; color: var(--text-principal); }
.panel-section strong { color: var(--text-secundario); }

/* Caixa de Nova Observação */
.add-observation textarea { 
    width: 100%; 
    background: #FFFFFF; 
    border: none; 
    border-radius: 6px; 
    padding: 12px; 
    min-height: 80px; 
    margin-bottom: 10px; 
    resize: vertical; 
    font-family: 'Inter', sans-serif;
    color: #12161A;
}
.btn-save { background-color: var(--status-producao); color: white; border: none; padding: 8px 20px; border-radius: 4px; cursor: pointer; font-weight: 600; transition: 0.2s; }
.btn-save:hover { opacity: 0.9; }

/* Linha do Tempo (Timeline) */
.timeline { margin-top: 30px; border-left: 2px solid var(--border-color); padding-left: 20px; position: relative; }
.timeline-item { background: #F1F5F9; color: #1E293B; padding: 12px; border-radius: 6px; position: relative; margin-bottom: 20px; font-size: 0.85rem; line-height: 1.4; }

/* A "bolinha" na linha do tempo */
.timeline-item::before { 
    content: ''; 
    position: absolute; 
    left: -27px; /* Posiciona exatamente sobre a linha */
    top: 15px; 
    width: 12px; 
    height: 12px; 
    background: var(--text-secundario); 
    border-radius: 50%; 
}

.timeline-actions { margin-top: 12px; display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 600; border-top: 1px solid #CBD5E1; padding-top: 8px; }
.timeline-actions a { color: var(--card-blue); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.timeline-actions a.text-danger { color: #DC2626; }