:root {
    --primary: #023e8a; /* Azul clássico de álbum de copa */
    --primary-light: #0077b6; /* Azul vibrante */
    --accent: #ffb703; /* Dourado brilhante para destaque */
    --bg-color: #f0f4f8; /* Fundo cinza bem claro/azulado */
    --card-bg: #ffffff;
    --text-main: #1d3557;
    --text-muted: #6c757d;
    --success: #ffb703; /* Repetidas em Dourado */
    --danger: #e63946;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-bottom: 50px;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 2rem 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.stats {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    height: auto;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

select, #search-input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    background-color: #fff;
}

#search-input {
    flex-grow: 1.5;
}

select {
    flex-grow: 1;
    cursor: pointer;
}

select:focus, #search-input:focus {
    border-color: var(--primary);
}

.filter-toggles {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-toggles label {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    width: auto;
    height: auto;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.export-btn:hover {
    background: var(--primary-light);
}

.export-btn:active {
    transform: scale(0.95);
}

.grid {
    display: flex;
    flex-direction: column;
}

.team-header {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.2rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card.has-duplicate {
    border-color: var(--success);
    background-color: #f0fdf4;
}

.sticker-id {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.team-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1rem;
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 0.3rem;
}

button {
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
    color: var(--text-main);
}

button:hover {
    background: var(--primary);
    color: white;
}

button:active {
    transform: scale(0.9);
}

.quantity {
    font-weight: 800;
    font-size: 1.2rem;
    min-width: 30px;
}

.has-duplicate .quantity {
    color: var(--success);
}

/* Responsividade para Celulares */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-toggles {
        justify-content: space-between;
        width: 100%;
        margin-top: 0.5rem;
    }

    #search-input, select {
        width: 100%;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.8rem;
    }
    
    .card {
        padding: 0.8rem;
    }
}
