:root {
    /* Cores da Marca */
    --primary-color: #1E3A5F;     /* Azul principal */
    --primary-dark: #0D2840;      /* Azul escuro */
    --primary-light: #2A4B6A;     /* Azul médio */
    --secondary-color: #D4AF37;   /* Dourado principal */
    --accent-color: #4A90E2;      /* Azul claro para destaques */
    --success-color: #2E7D32;     /* Verde para confirmações */
    --warning-color: #ED6C02;     /* Laranja para alertas */
    --error-color: #D32F2F;       /* Vermelho para erros */
    
    /* Cores de Texto */
    --text-color: #2C3E50;        /* Texto principal */
    --text-light: #6B7280;        /* Texto secundário */
    --text-on-dark: #FFFFFF;      /* Texto claro para fundos escuros */
    --text-on-light: #1E3A5F;     /* Texto escuro para fundos claros */
    
    /* Cores de Fundo */
    --bg-light: #FFFFFF;          /* Fundo branco */
    --bg-light-gray: #F8FAFC;     /* Fundo cinza claro */
    --border-color: #E2E8F0;      /* Cor da borda */
    
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    /* Bordas */
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Espaçamentos */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Cores de fundo */
    --background: #F5F7FA;        /* Fundo cinza muito claro */
    --card-bg: #FFFFFF;           /* Fundo branco puro */
    --card-hover: #F8FAFC;        /* Fundo levemente acinzentado ao passar o mouse */
    --header-bg: #1E3A5F;         /* Azul escuro para o cabeçalho */
    --sidebar-bg: #2C3E50;        /* Azul escuro para a barra lateral */
    
    /* Cores de destaque e bordas */
    --border-color: #E2E8F0;      /* Cinza azulado muito claro */
    --border-light: #F1F5F9;      /* Borda mais clara */
    --border: 1px solid var(--border-color);
    --shadow: var(--shadow-sm);
    --shadow-hover: var(--shadow-lg);
    --shadow-card: var(--shadow-md);
    
    /* Efeitos e transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient: linear-gradient(135deg, var(--secondary-color), #E8C46E);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    
    /* Tipografia */
    --font-primary: 'Poppins', 'Nunito', sans-serif;
    --font-secondary: 'Nunito', 'Poppins', sans-serif;
    
    /* Variáveis de layout */
    --container-max-width: 1400px;
    --card-min-height: 200px;
    --header-height: 280px;
    --header-padding: 30px 5%;
    --section-spacing: var(--spacing-xl);
    --sidebar-width: 280px;
    --card-padding: var(--spacing-lg);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-light-gray);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    margin-top: 0 !important;
    padding-top: 0 !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
    letter-spacing: 0.2px;
}

/* Estilos para telas maiores */
@media screen and (min-width: 1200px) {
    body {
        font-size: 17px;
    }
}

@media screen and (min-width: 1600px) {
    body {
        font-size: 18px;
    }
}

/* Importando a fonte Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Layout Principal */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 5%;
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    padding-bottom: 60px;
    padding-top: 0; /* remove espaço em branco acima do header */
}

@media screen and (min-width: 1600px) {
    .container {
        padding-top: 0;
        padding-right: 8%;
        padding-bottom: 60px;
        padding-left: 8%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px 20px;
        border-radius: 0;
    }
}

/* Cabeçalho - mesmo comportamento visual do exercicio_view */
.header {
    background: var(--primary-color);
    color: var(--text-on-dark);
    padding: 50px 0 60px;
    margin: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    overflow: hidden;
    border-bottom: 4px solid var(--secondary-color);
    box-shadow: var(--shadow-md);
    z-index: 1;
    text-align: center;
    box-sizing: border-box;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.1) 0%, rgba(42, 75, 106, 0.05) 100%);
    z-index: 0;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(255, 255, 255, 0.2) 100%);
    pointer-events: none;
    z-index: 0;
}

.header h1 {
    color: var(--text-on-dark);
    margin: 0 0 20px 0;
    font-weight: 800;
    font-size: 2.8rem;
    position: relative;
    display: block;
    letter-spacing: -0.02em;
    line-height: 1.2;
    padding-bottom: 15px;
    width: 100%;
    max-width: 1000px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
    font-family: var(--font-secondary);
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

@media screen and (min-width: 1200px) {
    .header h1 {
        font-size: 3.2rem;
        margin-bottom: 20px;
    }
}

@media screen and (min-width: 1600px) {
    .header h1 {
        font-size: 3.5rem;
        max-width: 1200px;
    }
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(199, 165, 92, 0.4);
}

.header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(47, 62, 76, 0.1);
}

.user-profile {
    display: inline-flex;
    align-items: center;
    margin: 15px 0 0 0;
    padding: 12px 24px 12px 20px;
    background: var(--secondary-color);
    color: #1A3A5F; /* Cor do texto alterada para azul escuro */
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(26, 58, 95, 0.2);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.user-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    z-index: -1;
    transition: var(--transition);
}

.user-profile:hover::before {
    opacity: 0.8;
}

.user-profile i {
    margin-right: 10px;
    font-size: 1.2em;
    transition: var(--transition);
    color: #1A3A5F; /* Cor do ícone em azul escuro */
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.user-profile:hover i {
    transform: translateX(3px);
}

.user-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 58, 95, 0.25);
    color: #0D2840; /* Cor do texto mais escura no hover */
    border-color: rgba(255, 255, 255, 0.5);
}

.user-profile strong {
    color: #0D2840; /* Azul mais escuro para melhor contraste */
    margin-left: 6px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(199, 165, 92, 0.4);
}

p {
    color: var(--text-light);
    margin: 10px 0 40px 0;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.7;
    max-width: 700px;
    opacity: 0.9;
}

/* Grid de Cards */
.menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: var(--section-spacing, 30px) 0;
    position: relative;
    z-index: 1;
    padding: 0 5px;
    width: 100%;
    align-items: stretch;
    box-sizing: border-box;
}

@media screen and (min-width: 1200px) {
    .menu {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media screen and (min-width: 1400px) {
    .menu {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .menu {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 0 10px;
    }
    
    .card {
        min-height: 160px;
    }
    
    .card a {
        padding: 20px 10px;
    }
    
    .card i {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 0;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    height: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--secondary-color);
    z-index: 1;
    margin: 0;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
    background: var(--bg-light);
    z-index: 2;
}

.card:hover::before {
    opacity: 1;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: all 0.4s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    opacity: 1;
    z-index: 1;
    box-shadow: 0 0 15px rgba(199, 165, 92, 0.4);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    background: white;
    border-top-color: var(--accent-color);
    z-index: 2;
}

.card:hover::before {
    opacity: 0.8;
    height: 100%;
}

.card:hover::after {
    opacity: 0.1;
    height: 100%;
    background: var(--gradient);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 25px 15px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    background: white;
    text-align: center;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.card a span {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.15);
    border-color: var(--secondary-color);
}

.card:hover a {
    color: var(--primary-dark);
}

.card:hover i {
    transform: scale(1.1);
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

@media screen and (min-width: 1600px) {
    .card a {
        font-size: 1.4rem;
        gap: 20px;
    }
}

.card i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    background: none;
    -webkit-text-fill-color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 3px 10px rgba(30, 58, 95, 0.1);
    padding: 12px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.card:hover i {
    transform: translateY(-5px);
    color: var(--secondary-dark);
    background: white;
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.15);
    animation: float 3s ease-in-out infinite;
    border-color: var(--secondary-light);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* Rodapé e Logout */
.logout {
    margin-top: 60px;
    padding-top: 30px;
    text-align: center;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-light);
}

@media screen and (min-width: 1200px) {
    .logout {
        margin-top: 80px;
        padding-top: 40px;
    }
}

.logout a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--primary-color);
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-light);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    box-shadow: var(--shadow-sm);
    z-index: 1;
    -webkit-appearance: none;
    appearance: none;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 1600px) {
    .logout a {
        padding: 14px 30px;
        font-size: 1.1rem;
    }
}

.logout a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    opacity: 0.9;
}

.logout a:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.2);
    border-color: var(--primary-dark);
    background: transparent;
}

.logout a:hover::before {
    width: 100%;
    opacity: 1;
}

.logout a i {
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.logout a:hover i {
    transform: translateX(3px);
    color: white;
}

/* Elementos decorativos */
.container::before {
    content: '';
    position: fixed;
    right: -200px;
    top: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.08) 0%, rgba(241, 245, 249, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    filter: blur(20px);
}

.container::after {
    content: '';
    position: fixed;
    left: -200px;
    bottom: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(44, 62, 80, 0.08) 0%, rgba(241, 245, 249, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    filter: blur(20px);
}

/* Efeito de partículas no fundo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMkMzRTUwIiBmaWxsLW9wYWNpdHk9IjAuMDMiPjxyZWN0IHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgeD0iMTAiIHk9IjEwIi8+PHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiB4PSIzMCIgeT0iMzAiLz48cmVjdCB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHg9IjcwIiB5PSI3MCIvPjxyZWN0IHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgeD0iNTAiIHk9IjUwIi8+PHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiB4PSI4MCIgeT0iMjAiLz48L2c+PC9zdmc+');
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}

/* Efeito de bolinhas decorativas */
.card::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, var(--accent-color-2) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.3;
    bottom: -15px;
    right: -15px;
    transition: var(--transition);
}

.card:hover::after {
    transform: scale(1.5);
    opacity: 0.5;
}

/* Responsividade */
@media (max-width: 1024px) {
    .menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-padding: 30px 15px;
        --card-min-height: 160px;
        --section-spacing: 30px;
        --border-radius: 12px;
    }

    .container {
        padding: 0 15px 30px;
    }
    
    .header {
        padding: 40px 5% 50px;
        margin: -20px -15px 40px -15px;
        border-radius: 0;
    }
    
    .header h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .menu {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: var(--section-spacing) 0;
        padding: 0 5px;
    }
    
    .card {
        min-height: var(--card-min-height);
        padding: 25px 20px;
        border-radius: var(--border-radius);
    }
    
    .card i {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .card a {
        font-size: 1.1rem;
        gap: 12px;
    }
    
    .logout {
        margin-top: 40px;
        padding-top: 30px;
    }
    
    .logout a {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    .card i {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
    
    .card a {
        font-size: 1rem;
    }
}

/* Animações */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* Efeito hover para cards */
.card:hover {
    animation: float 3s ease-in-out infinite;
}

/* Efeito de loading para os cards */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.card:active {
    animation: pulse 0.3s ease;
}

/* Melhorias de acessibilidade */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Efeito de hover mais suave */
.card, .logout a {
    transition: var(--transition);
}

/* Estilo para o indicador de perfil */
p strong {
    color: var(--accent-color);
    background: rgba(255, 107, 107, 0.1);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px dashed rgba(255, 107, 107, 0.3);
}
