/* ================================================
   ACRM - Design System
   Cores baseadas no logo oficial da ACRM
   ================================================ */

:root {
    /* Cores Primárias ACRM */
    --acrm-azul: #0057b8;
    --acrm-azul-escuro: #003d82;
    --acrm-azul-claro: #3380d4;
    --acrm-vermelho: #d32f2f;
    --acrm-vermelho-escuro: #9a0007;
    --acrm-amarelo: #ffd700;
    --acrm-amarelo-escuro: #ccac00;
    
    /* Cores Secundárias */
    --cinza-escuro: #333333;
    --cinza-medio: #666666;
    --cinza-claro: #e0e0e0;
    --fundo-claro: #f8f9fa;
    --branco: #ffffff;
    
    /* Strava (módulo específico) */
    --strava-laranja: #fc4c02;
    --strava-laranja-escuro: #c73e01;
    
    /* Sombras */
    --sombra-leve: 0 2px 4px rgba(0, 0, 0, 0.1);
    --sombra-media: 0 4px 8px rgba(0, 0, 0, 0.15);
    --sombra-forte: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Transições */
    --transicao-rapida: 0.2s ease;
    --transicao-media: 0.3s ease;
}

/* ================================================
   RESET E BASE
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0057b822 0%, #ffd70022 50%, #d32f2f22 100%);
    color: var(--cinza-escuro);
    line-height: 1.6;
    min-height: 100vh;
}

/* ================================================
   LAYOUT PRINCIPAL
   ================================================ */

.header-principal {
    background: linear-gradient(135deg, var(--acrm-azul) 0%, var(--acrm-azul-escuro) 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--sombra-media);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: -0.3rem;
}

.logo-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}

a:hover .logo-header {
    opacity: 0.9;
    cursor: pointer;
}

.logo-header img {
    height: 70px;
    width: auto;
}

.logo-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Botão Admin Link */
.btn-admin-link {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 215, 0, 0.25);
    color: #ffd700;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transicao-rapida);
    white-space: nowrap;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.btn-admin-link:hover {
    background: rgba(255, 215, 0, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--sombra-media);
}

.nav-principal {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-principal a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transicao-rapida);
    font-size: 0.95rem;
}

.nav-principal a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Área de Login/User */
.user-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-badge {
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transicao-rapida);
    display: inline-block;
}

.user-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user-badge.visitor {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.user-badge.user {
    background: rgba(255, 255, 255, 0.95);
    color: var(--acrm-azul);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-badge.admin {
    background: rgba(255, 255, 255, 0.95);
    color: #f57c00;
    border: 2px solid rgba(255, 193, 7, 0.4);
}

.btn-login {
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transicao-rapida);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--branco);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--sombra-media);
}

.container-pequeno {
    max-width: 600px;
}

.container-medio {
    max-width: 900px;
}

/* ================================================
   TIPOGRAFIA
   ================================================ */

h1 {
    color: var(--acrm-azul);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h2 {
    color: var(--acrm-azul);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    color: var(--acrm-azul-escuro);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

/* ================================================
   BOTÕES
   ================================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transicao-rapida);
    text-align: center;
}

.btn-primario {
    background: var(--acrm-azul);
    color: white;
}

.btn-primario:hover {
    background: var(--acrm-azul-escuro);
    transform: translateY(-2px);
    box-shadow: var(--sombra-media);
}

.btn-secundario {
    background: var(--acrm-vermelho);
    color: white;
}

.btn-secundario:hover {
    background: var(--acrm-vermelho-escuro);
    transform: translateY(-2px);
    box-shadow: var(--sombra-media);
}

.btn-strava {
    background: var(--strava-laranja);
    color: white;
}

.btn-strava:hover {
    background: var(--strava-laranja-escuro);
    transform: translateY(-2px);
    box-shadow: var(--sombra-media);
}

.btn-neutro {
    background: var(--cinza-medio);
    color: white;
}

.btn-neutro:hover {
    background: var(--cinza-escuro);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--acrm-azul);
    color: var(--acrm-azul);
}

.btn-outline:hover {
    background: var(--acrm-azul);
    color: white;
}

.btn-voltar {
    background: var(--cinza-claro);
    color: var(--cinza-escuro);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-voltar:hover {
    background: var(--cinza-medio);
    color: white;
}

/* ================================================
   CARDS E LISTAS
   ================================================ */

.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--sombra-leve);
    margin-bottom: 1.5rem;
    transition: var(--transicao-rapida);
}

.card:hover {
    box-shadow: var(--sombra-media);
    transform: translateY(-4px);
}

.card h3 {
    margin-bottom: 1rem;
}

.lista-menu {
    list-style: none;
    padding: 0;
}

.lista-menu li {
    margin-bottom: 1rem;
}

.lista-menu a {
    display: block;
    padding: 1rem 1.5rem;
    background: var(--acrm-azul);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transicao-rapida);
    font-size: 1.05rem;
}

.lista-menu a:hover {
    background: var(--acrm-azul-escuro);
    transform: translateX(8px);
    box-shadow: var(--sombra-media);
}

/* ================================================
   FORMULÁRIOS
   ================================================ */

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--cinza-escuro);
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--cinza-claro);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transicao-rapida);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--acrm-azul);
    box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.1);
}

input[type="file"] {
    padding: 0.5rem;
}

/* ================================================
   TABELAS
   ================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

thead {
    background: var(--acrm-azul);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--cinza-claro);
}

tbody tr:hover {
    background: var(--fundo-claro);
}

tbody tr:nth-child(even) {
    background: #f9f9f9;
}

/* ================================================
   ALERTAS E MENSAGENS
   ================================================ */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-sucesso {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-erro {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-aviso {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* ================================================
   UTILITÁRIOS
   ================================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ================================================
   RESPONSIVO
   ================================================ */

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-right {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .nav-principal {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-principal a {
        width: 100%;
        text-align: center;
    }
    
    .user-area {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 1rem;
        justify-content: center;
        width: 100%;
    }
    
    .logo-header h1 {
        font-size: 1.2rem;
    }
    
    .container {
        margin: 1rem;
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}

/* ================================================
   FOOTER
   ================================================ */

.footer {
    background: var(--cinza-escuro);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer p {
    margin: 0.5rem 0;
    color: var(--cinza-claro);
}

.footer a {
    color: var(--acrm-amarelo);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
