/* css/modules.css */

/* =========================================
   1. CONFIGURAÇÕES GERAIS E FUNDO
   ========================================= */

/* Fundo padrão */
.bg-dark {
    background-color: #050505;
    /* Gradiente radial sutil no topo */
    background-image: radial-gradient(circle at 50% 0%, rgba(20, 184, 166, 0.08) 0%, rgba(0, 0, 0, 0) 50%);
    background-attachment: fixed;
}

.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

/* Sombra de texto suave para títulos */
.text-shadow-sm {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* =========================================
   2. EFEITO DE VIDRO (GLASSMORPHISM)
   ========================================= */

.glass-panel {
    background: rgba(18, 18, 18, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(20, 184, 166, 0.2);
}

/* =========================================
   3. BARRAS DE ROLAGEM (SCROLLBAR)
   ========================================= */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a; 
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 3px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: #14b8a6; /* Teal */
}

/* Classe utilitária para forçar scrollbar em divs específicas */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

/* =========================================
   4. COMPONENTES DE FORMULÁRIO
   ========================================= */

input[type="file"]::file-selector-button {
    border: none;
    margin-right: 0.5rem;
    transition: background-color 0.3s;
}

/* Animação Fade In */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* =========================================
   5. MATRIZ DE CONTROLE (BOTÕES DE GRANDEZAS)
   ========================================= */

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.matrix-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.matrix-header {
    font-size: 0.65rem; /* ~10px */
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0.25rem;
    color: #6b7280; /* Gray 500 */
    letter-spacing: 0.05em;
}

/* Botão Toggle Base */
.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
    color: #9ca3af; /* Inativo */
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Estados Ativos por Fase */
/* Fase A (Verde) */
.toggle-btn.active-a { 
    background: rgba(16, 185, 129, 0.2); 
    border-color: rgba(16, 185, 129, 0.5); 
    color: #34d399; 
}

/* Fase B (Cinza/Branco) */
.toggle-btn.active-b { 
    background: rgba(255, 255, 255, 0.1); 
    border-color: rgba(255, 255, 255, 0.3); 
    color: #e5e7eb; 
}

/* Fase C (Laranja/Amber) */
.toggle-btn.active-c { 
    background: rgba(245, 158, 11, 0.2); 
    border-color: rgba(245, 158, 11, 0.5); 
    color: #fbbf24; 
}

/* Indicador visual (bolinha) */
.toggle-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 5px currentColor;
    opacity: 0;
    transition: opacity 0.2s;
}

.toggle-btn.active-a .toggle-dot,
.toggle-btn.active-b .toggle-dot,
.toggle-btn.active-c .toggle-dot { 
    opacity: 1; 
}

/* =========================================
   6. SISTEMA DE NOTIFICAÇÕES (MODAL & TOAST)
   ========================================= */

/* Fundo Escuro do Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200; /* Acima de tudo */
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* O Card do Modal */
.modal-box {
    background: #1a1c20;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

/* Estilos de Cabeçalho do Modal (Fallback se não usar Tailwind no JS) */
.modal-header.error { border-bottom: 1px solid rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.05); }
.modal-header.warning { border-bottom: 1px solid rgba(245, 158, 11, 0.2); background: rgba(245, 158, 11, 0.05); }
.modal-header.success { border-bottom: 1px solid rgba(16, 185, 129, 0.2); background: rgba(16, 185, 129, 0.05); }

/* Toast (Notificação flutuante no canto inferior) */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 210;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #1a1c20;
    border-left: 4px solid #14b8a6; /* Teal padrão */
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    transform: translateX(120%); /* Começa fora da tela */
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateX(0); /* Entra na tela */
}