/* ===== ANIMAÇÕES RELATA+ ===== */

/* 1. Cards Flutuando ao Hover */
.stat-card,
.setting-card,
.paciente-card,
.recent-activities,
.form-container,
.table-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover,
.paciente-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15) !important;
}

.setting-card:hover,
.form-container:hover,
.recent-activities:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

/* 2. Botões com Bounce */
.btn,
.btn-primary,
.btn-secondary,
.btn-logout,
.btn-save-final,
.btn-login,
.btn-signup,
.quick-action-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:hover,
.btn-primary:hover,
.btn-logout:hover,
.btn-save-final:hover,
.btn-login:hover,
.btn-signup:hover:not(:disabled),
.quick-action-btn:hover {
    transform: translateY(-3px) scale(1.02);
}

.btn:active,
.btn-primary:active,
.btn-login:active,
.btn-signup:active {
    transform: translateY(-1px) scale(0.98);
}

/* 3. Ícones Girando ao Clicar */
.btn:active .btn-icon,
.btn-primary:active .btn-icon,
.btn-login:active .btn-icon,
.btn-signup:active .btn-icon {
    animation: spin 0.5s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 4. Fade In dos Cards ao Carregar */
.stat-card,
.paciente-card,
.activity-item,
.setting-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.paciente-card:nth-child(1) { animation-delay: 0.1s; }
.paciente-card:nth-child(2) { animation-delay: 0.2s; }
.paciente-card:nth-child(3) { animation-delay: 0.3s; }
.paciente-card:nth-child(4) { animation-delay: 0.4s; }
.paciente-card:nth-child(5) { animation-delay: 0.5s; }
.paciente-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. Inputs com Foco Animado */
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.chat-input:focus {
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* 6. Ícones Pulsando */
.stat-icon,
.card-icon,
.section-icon {
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon,
.setting-card:hover .card-icon,
.form-section:hover .section-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 7. Menu Items com Slide */
.menu-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0%;
    background: #5B9FD8;
    transition: height 0.3s ease;
}

.menu-item:hover::before {
    height: 100%;
}

.menu-item:hover {
    padding-left: 28px;
}

/* 8. Avatar com Pulso */
.user-avatar,
.paciente-avatar,
.patient-avatar,
.message-avatar {
    transition: all 0.3s ease;
}

.user-avatar:hover,
.paciente-avatar:hover,
.patient-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(91, 159, 216, 0.4);
}

/* 9. Badge Animado */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* 10. Tabela com Hover Suave */
tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    transform: translateX(4px);
    background: #f9fafb !important;
}

/* 11. Modal com Fade e Scale */
.modal.active .modal-content,
.chat-modal.active .chat-container,
.login-container,
.signup-container {
    animation: modalAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 12. Loading nos Botões */
.btn-primary:disabled,
.btn-login:disabled,
.btn-signup:disabled {
    position: relative;
    pointer-events: none;
}

.btn-primary:disabled::after,
.btn-login:disabled::after,
.btn-signup:disabled::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: 20px;
}

/* 13. Mensagens do Chat Deslizando */
.message {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 14. Success Message Animada */
.success-message.show,
.alert.show {
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 15. Logo Girando ao Hover */
.logo-icon {
    transition: all 0.5s ease;
}

.logo:hover .logo-icon {
    transform: rotate(360deg);
}

/* 16. Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* 17. Feature Items com Hover */
.feature-item {
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    background: #e0f2fe !important;
}

/* 18. Voice Button Pulsando quando Recording */
.voice-btn.recording {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* 19. Skeleton Loading (opcional para depois) */
@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 20. Transição Suave de Página */
body {
    animation: pageLoad 0.5s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}/* ===== SKELETON LOADING ===== */

/* Animação de pulsação */
@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Classe base do skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* Skeleton para cards */
.skeleton-card {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
}

/* Skeleton para texto */
.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

/* Skeleton para título */
.skeleton-title {
    height: 28px;
    width: 40%;
    margin-bottom: 16px;
}

/* Skeleton para avatar/círculo */
.skeleton-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

/* Skeleton para botão */
.skeleton-button {
    height: 44px;
    width: 120px;
    border-radius: 8px;
}

/* Skeleton para stat card específico */
.skeleton-stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.skeleton-stat-card .skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.skeleton-stat-card .skeleton-label {
    height: 14px;
    width: 70%;
    margin-bottom: 8px;
}

.skeleton-stat-card .skeleton-value {
    height: 32px;
    width: 50%;
    margin-bottom: 4px;
}

.skeleton-stat-card .skeleton-change {
    height: 13px;
    width: 40%;
}

/* Skeleton para paciente card */
.skeleton-paciente-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.skeleton-paciente-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.skeleton-paciente-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-paciente-info {
    flex: 1;
}

.skeleton-paciente-name {
    height: 18px;
    width: 60%;
    margin-bottom: 8px;
}

.skeleton-paciente-meta {
    height: 14px;
    width: 40%;
}

.skeleton-paciente-detail {
    height: 14px;
    width: 90%;
    margin-bottom: 12px;
}

/* Skeleton para relatório card */
.skeleton-relatorio-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.skeleton-relatorio-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.skeleton-relatorio-title {
    height: 18px;
    width: 50%;
    margin-bottom: 8px;
}

.skeleton-relatorio-meta {
    height: 14px;
    width: 30%;
}

.skeleton-relatorio-badge {
    height: 28px;
    width: 90px;
    border-radius: 6px;
}

.skeleton-relatorio-preview {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    height: 100px;
}

.skeleton-relatorio-preview .skeleton-line {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-relatorio-preview .skeleton-line:last-child {
    width: 70%;
}

.skeleton-relatorio-actions {
    display: flex;
    gap: 12px;
}

/* Container para múltiplos skeletons */
.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.skeleton-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Fade in quando o conteúdo real carrega */
.fade-in {
    animation: fadeInContent 0.5s ease-out;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ocultar skeleton quando conteúdo carrega */
.skeleton-hidden {
    display: none;
}