/* Pilot Area Styles */
:root {
    --primary-blue: #0A192F;
    --secondary-blue: #112240;
    --accent-red: #D32F2F;
    --text-light: #F8F9FA;
    --text-muted: #8892b0;
    --bg-gray: #F4F6F9;
    --card-bg: rgba(255, 255, 255, 0.05);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pilot-body {
    background: linear-gradient(135deg, #0A192F 0%, #020c1b 100%);
    color: var(--text-light);
    min-height: 100vh;
    padding-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.pilot-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid var(--accent-red);
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.3);
    transition: transform 0.3s ease;
}

.avatar-wrapper:hover {
    transform: scale(1.05);
}

.pilot-avatar-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay i {
    color: white;
    font-size: 1.5rem;
}

.pilot-details h1 {
    font-size: 2rem;
    margin: 0;
    font-weight: 300;
    letter-spacing: 1px;
}

.pilot-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-container {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.chart-container h3 {
    margin-bottom: 1.5rem;
    font-weight: 400;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.flights-table-container {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    overflow-x: auto;
}

.flights-table-container h3 {
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.callsign-cell {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--accent-red);
}

.route-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icao-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
}

.network-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
}

.network-ivao {
    background: #0d47a1;
}

.network-vatsim {
    background: #2e7d32;
}

@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .pilot-info {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .pilot-details h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .chart-container,
    .flights-table-container {
        padding: 1.2rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Distintivos / Insignias */
.insignias-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.5rem;
}

.insignia-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(211, 47, 47, 0.1);
    border: 1px solid rgba(211, 47, 47, 0.3);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    min-width: 90px;
    text-align: center;
    cursor: default;
    transition: transform 0.2s, background 0.2s;
}

.insignia-item:hover {
    transform: translateY(-3px);
    background: rgba(211, 47, 47, 0.18);
}

.insignia-item i {
    font-size: 1.4rem;
    color: var(--accent-red);
}

.insignia-item span {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paginação */
.paginacao {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.pag-btn:hover {
    background: rgba(211, 47, 47, 0.2);
    border-color: var(--accent-red);
    color: var(--text-light);
}

.pag-active {
    background: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
    color: white !important;
    font-weight: bold;
}

.pag-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Perfil público — voltar */
.perfil-back {
    margin-bottom: 1.5rem;
}

.perfil-back a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.perfil-back a:hover {
    color: var(--accent-red);
}

/* Link transparente nos cards de piloto */
.pilot-badge-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.pilot-badge-link .pilot-badge {
    transition: transform 0.25s, box-shadow 0.25s;
}

.pilot-badge-link:hover .pilot-badge {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}