/* assets/css/style.css 
   Versão: v2.0.0 - Unificada e Otimizada
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- 1. VARIÁVEIS E ROOT --- */
:root {
    --ecos-bg: #f8fafc;
    --ecos-slate-900: #0f172a;
    --ecos-slate-700: #334155;
    --ecos-slate-500: #64748b;
    --ecos-slate-400: #94a3b8;
    --ecos-blue-600: #2563eb;
}

/* --- 2. RESET E ESTRUTURA GLOBAL --- */
html, body { 
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif; 
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ecos-bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.select2-container--default .select2-selection--single {
    background-color: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.75rem; height: 52px; padding: 10px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 50px; }
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; }

main {
    flex: 1;
    width: 100%;
    max-width: 100% !important;
}

/* --- 3. COMPONENTES DE UI (BOTOES E INPUTS) --- */
.form-input-ecos {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--ecos-slate-700);
    outline: none;
    transition: all 0.2s ease-in-out;
}

.form-input-ecos:focus {
    border-color: var(--ecos-slate-900);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05);
}

.btn-primary-ecos {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: var(--ecos-blue-600);
    color: white;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.2em;
    padding: 1.25rem;
    border-radius: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
    cursor: pointer;
}

.btn-primary-ecos:active {
    transform: scale(0.96);
    background-color: #1d4ed8;
}

/* --- 4. MODAIS (SWEETALERT2) --- */
.swal2-popup { border-radius: 2rem !important; padding: 2rem !important; }
.swal2-actions { gap: 10px; } 

.swal2-styled.swal2-confirm, 
.swal2-styled.swal2-cancel { 
    height: 48px !important;
    min-width: 120px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 1rem !important; 
    font-size: 10px !important; 
    font-weight: 800 !important; 
    text-transform: uppercase !important; 
    letter-spacing: 0.1em !important; 
}

.swal2-styled.swal2-confirm { background-color: var(--ecos-slate-900) !important; }
.swal2-styled.swal2-cancel { background-color: #f1f5f9 !important; color: var(--ecos-slate-500) !important; }

/* --- 5. GRADE DE HORÁRIOS --- */
.horarios-grid-wrapper { 
    display: grid;
    grid-template-columns: repeat(7, 1fr); 
    gap: 12px;
    margin-left: 65px; 
    margin-right: 25px;
    padding-bottom: 100px;
    width: calc(100% - 90px); 
}

.time-slot-30 { 
    height: 65px; 
    border-bottom: 1px solid #f1f5f9; 
    position: relative; 
}

.horario-card-obj { 
    position: absolute;
    top: 2px; left: 2px; right: 2px;
    z-index: 20;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: grab;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.dropzone { height: 100%; width: 100%; position: relative; }

/* --- 6. ANIMAÇÕES E EFEITOS --- */
.drop-shadow-glow { filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.3)); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeIn 0.6s ease-out forwards; }

.rounded-\[2rem\], .rounded-\[2\.5rem\] { transition: transform 0.2s ease-in-out; }
.rounded-\[2rem\]:active { transform: scale(0.98); }

/* --- 7. RESPONSIVIDADE (UNIFICADA) --- */
@media (max-width: 768px) {
    body { overflow-x: hidden; }
    
    main { padding-bottom: 80px !important; }

    /* Ajuste de Modais no Mobile */
    .swal2-popup { border-radius: 1.5rem !important; padding: 1.5rem !important; width: 90% !important; }
    .swal2-styled.swal2-confirm, .swal2-styled.swal2-cancel { min-width: 100px !important; flex: 1; }

    /* Bottom Nav Mobile Respiro */
    .md\:hidden.fixed.bottom-0 {
        padding-bottom: env(safe-area-inset-bottom, 8px);
        box-shadow: 0 -4px 12px rgba(0,0,0,0.03);
    }

    /* Prevenção de Zoom no iPhone */
    input[type="text"], input[type="number"], input[type="email"], 
    input[type="password"], input[type="date"], select, textarea {
        font-size: 16px !important;
    }

    /* Ajuste de formulários e paddings */
    .p-10, .p-8 { padding: 1.5rem !important; }
    .rounded-\[2\.5rem\] { border-radius: 1.5rem !important; }
    .form-input-ecos { padding: 1.15rem 1.25rem; }

    /* Grade de Horários Scroll Lateral */
    .horarios-grid-wrapper {
        display: flex;
        overflow-x: auto;
        margin-left: 65px;
        margin-right: 10px;
        width: auto;
        gap: 20px;
    }
    .time-slot-30 { width: 250px; }

    /* Lista de Academias/KPIs */
    .grid-cols-1 { gap: 1rem !important; }
    .divide-y > div { border-radius: 1rem; margin-bottom: 0.5rem; }
}

/* Ajustes Extras para Telas Muito Pequenas */
@media (max-width: 640px) {
    .p-6 { padding: 1.25rem !important; }
}