/* Variáveis de Cores e Temas */
:root {
    --primary-red: #b22222; 
    --hover-red: #8b0000;
    
    /* MODO PADRÃO (Agora Cinza Claro) */
    --bg-color: #e5e5e5;    /* Cinza claro para o fundo da página */
    --card-bg: #ffffff;    /* Cards e áreas de conteúdo em branco para destaque */
    --text-color: #333;
    --input-bg: #ffffff;
    --border-color: #cccccc;
}

/* MODO ESCURO (Mantido igual) */
body.dark-mode {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --input-bg: #2d2d2d;
    --border-color: #444;
}

/* Reset e Estilos Gerais */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Botão Flutuante de Tema */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#toggle-dark-mode {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--primary-red);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#toggle-dark-mode:hover {
    transform: scale(1.1);
}

/* Componentes de Formulário Reutilizáveis */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary-red);
}

.btn-main {
    width: 100%;
    padding: 12px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-main:hover {
    background: var(--hover-red);
}

/* Classes utilitárias para o Logo */
.sidebar-header h2 span {
    color: var(--primary-red);
}
/* Modal padrão do sistema - substitui alert() e confirm() do navegador */
.sistema-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.sistema-modal-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

.sistema-modal {
    width: min(430px, 100%);
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary-red);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .45);
    transform: translateY(12px) scale(.98);
    transition: transform .2s ease;
}

.sistema-modal-overlay.ativo .sistema-modal {
    transform: translateY(0) scale(1);
}

.sistema-modal-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.8rem;
    color: var(--primary-red);
    background: rgba(178, 34, 34, .12);
}

.sistema-modal-icon.tipo-success { color: #27ae60; background: rgba(39, 174, 96, .12); }
.sistema-modal-icon.tipo-warning,
.sistema-modal-icon.tipo-confirm { color: #f39c12; background: rgba(243, 156, 18, .12); }
.sistema-modal-icon.tipo-error { color: #e74c3c; background: rgba(231, 76, 60, .12); }

.sistema-modal h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.sistema-modal p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.55;
    opacity: .9;
    white-space: pre-line;
}

.sistema-modal-acoes {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.btn-modal {
    flex: 1;
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}

.btn-modal:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-modal-principal { background: var(--primary-red); color: #fff; }
.btn-modal-secundario { background: var(--input-bg); color: var(--text-color); border: 1px solid var(--border-color); }
.btn-modal-perigo { background: #c0392b; }
