/* Estilos adicionais para melhorar a responsividade e UX */

/* Melhorias para dispositivos móveis */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .stats-card h2 {
        font-size: 1.8rem;
    }
    
    .stats-card .card-body {
        padding: 1.5rem;
    }
    
    .bot-card .card-body {
        padding: 1rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-xl {
        max-width: calc(100% - 1rem);
    }
    
    .file-upload-area {
        padding: 20px;
    }
    
    .log-container {
        height: 200px;
        font-size: 11px;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .user-info {
        display: none;
    }
    
    .btn-group-vertical {
        flex-direction: row;
    }
    
    .btn-group-vertical .btn {
        margin-right: 0.25rem;
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .navbar .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .stats-card h5 {
        font-size: 0.9rem;
    }
    
    .stats-card h2 {
        font-size: 1.5rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .form-control {
        font-size: 16px; /* Previne zoom no iOS */
    }
}

/* Melhorias para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-card h2 {
        font-size: 2.2rem;
    }
    
    .modal-xl {
        max-width: 90%;
    }
}

/* Animações suaves para elementos interativos */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-2px);
}

/* Melhorias para o tema escuro */
body.dark-theme .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body.dark-theme .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

body.dark-theme .btn-outline-danger {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

body.dark-theme .btn-outline-danger:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

body.dark-theme .btn-outline-warning {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

body.dark-theme .btn-outline-warning:hover {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}

/* Melhorias para o dropdown e seletores */
.form-select {
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

body.dark-theme .form-select {
    background: rgba(22, 33, 62, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

body.dark-theme .form-select:focus {
    background: var(--darker-bg);
    border-color: var(--primary-color);
}

/* Melhorias para textarea */
.form-control[type="textarea"] {
    resize: vertical;
    min-height: 100px;
}

/* Melhorias para badges */
.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Melhorias para o QR Code */
.qr-code-container {
    position: relative;
    overflow: hidden;
}

.qr-code-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Melhorias para os logs */
.log-container {
    position: relative;
}

.log-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(248, 249, 250, 1), transparent);
    pointer-events: none;
    z-index: 1;
}

        body.dark-theme .log-container::before {
            background: linear-gradient(to bottom, rgba(30, 41, 59, 1), transparent);
        }

/* Melhorias para o upload de arquivos */
.file-upload-area {
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.file-upload-area:hover::before {
    left: 100%;
}

/* Melhorias para os modais */
.modal-content {
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
}

.modal-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.modal-footer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

/* Melhorias para o navbar */
.navbar {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Melhorias para os cards de estatísticas */
.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

/* Melhorias para os botões de ação */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.btn-group .btn {
    border-radius: 8px;
}

.btn-group .btn:not(:last-child) {
    margin-right: 0.25rem;
}

/* Melhorias para o scrollbar */
.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

body.dark-theme .log-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

/* Melhorias para o loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Melhorias para os alertas */
.alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.alert-success {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(0, 212, 170, 0.1));
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 138, 128, 0.1));
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(254, 202, 87, 0.1), rgba(255, 167, 38, 0.1));
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(38, 198, 218, 0.1), rgba(0, 172, 193, 0.1));
    border-left: 4px solid #26c6da;
}

/* Melhorias para o tema escuro nos alertas */
body.dark-theme .alert {
    background: rgba(26, 26, 46, 0.9);
    color: var(--text-light);
}

/* Melhorias para acessibilidade */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Melhorias para o estado de carregamento */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

/* Melhorias para o estado vazio */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

body.dark-theme .empty-state {
    color: var(--text-muted);
}

/* Melhorias para o estado de erro */
.error-state {
    text-align: center;
    padding: 2rem;
    color: var(--danger-color);
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-state h5 {
    margin-bottom: 0.5rem;
    color: var(--danger-color);
}

/* Melhorias para o estado de sucesso */
.success-state {
    text-align: center;
    padding: 2rem;
    color: var(--success-color);
}

.success-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-state h5 {
    margin-bottom: 0.5rem;
    color: var(--success-color);
}

/* Estilos específicos para a página de agenda */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #2d3748;
}

.stat-content p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

/* Tema escuro para cards de estatísticas */
body.dark-theme .stat-card {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-theme .stat-content h3 {
    color: #e9ecef;
}

body.dark-theme .stat-content p {
    color: #adb5bd;
}

/* Estilos para tabela de agendamentos */
.table th {
    background: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Badges de status */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.bg-success {
    background-color: #28a745 !important;
    color: #fff !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.bg-info {
    background-color: #17a2b8 !important;
    color: #fff !important;
}

/* Botões de ação */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

/* Filtros */
.card-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
}

/* Tema escuro para tabelas */
body.dark-theme .table th {
    background: #404040;
    color: #e9ecef;
}

body.dark-theme .table td {
    color: #e9ecef;
}

body.dark-theme .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
} 

body.dark-theme .card-header h6 {
    color: #e9ecef;
}
