/* =====================================================
   BASE.CSS — Fundação do sistema
   Importar em TODAS as páginas, sempre primeiro.
   ===================================================== */

/* ========= VARIÁVEIS DO SISTEMA ========= */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --tertiary-color: #2ecc71;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --light-text: #666;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

/* ========= TEMA ESCURO ========= */
[data-theme="dark"] {
    --primary-color: #64b5f6;
    --secondary-color: #ffb74d;
    --tertiary-color: #81c784;
    --text-color: #e0e0e0;
    --bg-color: #1a1a1a;
    --light-text: #aaa;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* ========= RESET E BASE ========= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease;
}

/* ========= ANIMAÇÕES GLOBAIS ========= */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%       { transform: translate(20px, -30px) rotate(120deg); }
    66%       { transform: translate(-15px, 15px) rotate(240deg); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.1); opacity: 0.8; }
}

@keyframes pulse-proto {
    0%   { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.45); }
    70%  { box-shadow: 0 0 0 12px rgba(74, 144, 226, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
}

@keyframes loadingShimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}

@keyframes shake {
    0%, 100%                           { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90%            { transform: translateX(-5px); }
    20%, 40%, 60%, 80%                 { transform: translateX(5px); }
}

/* ========= ACESSIBILIDADE — MOVIMENTO REDUZIDO ========= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========= ALTO CONTRASTE ========= */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0056b3;
        --secondary-color: #d35400;
        --tertiary-color: #27ae60;
        --text-color: #000;
        --bg-color: #fff;
        --light-text: #444;
    }
}
