/* ========================================= */
/* IMPORTS */
/* ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========================================= */
/* VARIÁVEIS */
/* ========================================= */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #1bcfb4;
    --warning-color: #fed713;
    --danger-color: #fe7c96;
    --info-color: #8862e0;
}

/* ========================================= */
/* RESET E BASE */
/* ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================= */
/* LOGIN PAGE */
/* ========================================= */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: #22303d;
    min-height: 100vh;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-left {
    flex: 1;
    overflow: hidden;
}

.logo-container {
    width: 100%;
    height: 100%;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 70px 60px;
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-box h2 {
    font-size: 34px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 35px;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
    color: #1a1a1a;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 15px 16px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    font-size: 15px;
    transition: 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-group-checkbox {
    margin: 18px 0 28px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: #e8d9c5;
    background: #22303d;
    transition: 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-login:active {
    transform: translateY(0);
}

.error, .success {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 18px;
    display: none;
}

.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

/* ========================================= */
/* ANIMAÇÕES */
/* ========================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item {
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.menu-item.active::before {
    transform: scaleY(1);
}

/* Efeito Ripple */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ========================================= */
/* RESPONSIVO */
/* ========================================= */
@media (max-width: 991px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        height: 200px;
    }
    
    .login-right {
        padding: 40px 20px;
    }
}

/* Animação de Loading */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

button, a {
    position: relative;
}
/* ========================================= */
/* PÁGINA DE REUNIÕES - RESPONSIVO MOBILE */
/* ========================================= */

/* Otimizações gerais para mobile */
@media (max-width: 768px) {
    /* Ajustar padding geral */
    .p-4 {
        padding: 0.75rem !important;
    }
    
    /* Header de reuniões */
    .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    /* Títulos menores em mobile */
    h1 {
        font-size: 1.5rem !important;
    }
    
    /* Cards de resumo em coluna */
    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    /* Navegação de datas mais compacta */
    .bg-white.rounded-xl.shadow-sm.p-6 {
        padding: 1rem !important;
    }
    
    /* Botões de navegação menores */
    .flex.items-center.gap-2.px-4.py-2 {
        padding: 0.5rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Timeline de reuniões */
    .flex.hover\:bg-gray-50 {
        flex-direction: column !important;
    }
    
    /* Horário da timeline */
    .w-24.flex-shrink-0 {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        padding: 0.5rem !important;
    }
    
    /* Card de reunião */
    .mb-3.p-4.bg-gradient-to-r {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Reorganizar informações da reunião em mobile */
    .flex.items-start.justify-between {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    /* Nome da reunião menor */
    .font-bold.text-gray-900.text-lg {
        font-size: 1rem !important;
    }
    
    /* Telefone e horário em coluna */
    .flex.items-center.gap-4.text-sm {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    /* Tags de status e qualificação menores */
    .inline-flex.items-center.px-4.py-2.rounded-full {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    .inline-flex.items-center.px-4.py-2.rounded-full i {
        font-size: 0.875rem !important;
        margin-right: 0.25rem !important;
    }
    
    /* Botão editar menor */
    .ml-4.w-12.h-12.bg-blue-500 {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin-left: 0 !important;
    }
    
    /* Ícones de ação menores */
    button i, a i {
        font-size: 0.875rem !important;
    }
    
    /* Botão Nova Reunião flutuante em mobile */
    .px-6.py-3.bg-green-500 {
        position: fixed !important;
        bottom: 1rem !important;
        right: 1rem !important;
        z-index: 40 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
        padding: 0.875rem 1.25rem !important;
    }
    
    /* Modais em mobile */
    .max-w-md {
        max-width: 95% !important;
        margin: 0.5rem !important;
    }
    
    .max-w-lg {
        max-width: 95% !important;
        margin: 0.5rem !important;
    }
    
    /* Formulários em modais */
    .p-6.space-y-4 {
        padding: 1rem !important;
        max-height: calc(100vh - 120px) !important;
        overflow-y: auto !important;
    }
    
    /* Inputs menores em mobile */
    input[type="text"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    select {
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Labels menores */
    label {
        font-size: 0.8rem !important;
    }
    
    /* Botões do modal */
    .flex.gap-3.pt-4 button {
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }
}

/* iPhone 15 específico (390x844) */
@media (max-width: 430px) and (max-height: 932px) {
    /* Ajustes específicos para iPhone 15 */
    body {
        font-size: 14px;
    }
    
    /* Sidebar ocupar tela toda em mobile */
    #sidebar {
        width: 100% !important;
    }
    
    /* Conteúdo principal sem margem lateral em mobile */
    .lg\:ml-64 {
        margin-left: 0 !important;
    }
    
    /* Navbar ajustada */
    nav.fixed.top-0 {
        padding: 0.5rem !important;
    }
    
    /* Logo menor */
    nav img {
        height: 2rem !important;
    }
    
    /* Dia da semana menor */
    .text-2xl.font-bold {
        font-size: 1.25rem !important;
    }
    
    /* Data menor */
    .text-gray-600.mt-1 {
        font-size: 0.8rem !important;
    }
    
    /* Info agendamento menor */
    .text-xs.text-gray-500 {
        font-size: 0.7rem !important;
    }
    
    /* Safe area para iPhone (notch) */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Botão flutuante acima da área segura */
    .px-6.py-3.bg-green-500 {
        bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    }
}

/* Landscape mobile */
@media (max-width: 932px) and (orientation: landscape) {
    /* Modais ocupam mais espaço em landscape */
    .max-w-md, .max-w-lg {
        max-width: 80% !important;
        max-height: 90vh !important;
    }
    
    /* Scroll nos modais em landscape */
    .p-6.space-y-4 {
        max-height: calc(90vh - 100px) !important;
        overflow-y: auto !important;
    }
}

/* Touch targets mínimos para mobile */
@media (max-width: 768px) {
    button, a[role="button"], input[type="submit"] {
        min-height: 44px !important; /* Apple HIG recomendação */
        min-width: 44px !important;
    }
    
    /* Checkbox e radio maiores */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 20px !important;
        min-height: 20px !important;
    }
}

/* Animações suaves para mobile */
@media (max-width: 768px) {
    * {
        transition-duration: 0.2s !important;
    }
    
    /* Remover hover effects em touch devices */
    .hover\:bg-gray-50:hover,
    .hover\:bg-gray-100:hover,
    .hover\:shadow-md:hover {
        background-color: inherit !important;
        box-shadow: inherit !important;
    }
}

/* Prevenir zoom ao focar em inputs (iOS) */
@media (max-width: 768px) {
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        font-size: 16px !important; /* Previne zoom automático no iOS */
    }
}