/* ==========================================
   EQUIPOS PREMIER - ESTILO PREMIER LEAGUE
   ========================================== */

/* Variables CSS */
:root {
    --premier-purple: #37003C;
    --premier-magenta: #FF2882;
    --text-white: #FFFFFF;
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-light: #F8F8F8;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --hover-bg: #F5F5F5;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ==========================================
   HEADER
   ========================================== */

.page-header {
    background: var(--premier-purple);
    color: var(--text-white);
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-white);
}

.header-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    color: var(--text-white);
}

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

/* ==========================================
   BOTONES
   ========================================== */

.btn-primary {
    background: var(--text-white);
    color: var(--premier-purple);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary-page {
    background: var(--premier-magenta);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.btn-primary-page:hover {
    background: #E61C73;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 40, 130, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-family: 'Poppins', sans-serif;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-edit {
    background: var(--premier-purple);
    color: var(--text-white);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: #2D0030;
    transform: translateY(-2px);
}

.btn-delete {
    background: transparent;
    color: #DC2626;
    border: 2px solid #DC2626;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #DC2626;
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--text-gray);
    background: var(--hover-bg);
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */

.dashboard-main {
    padding: 2rem 0;
}

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

/* ==========================================
   SEARCH & FILTERS
   ========================================== */

.search-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--premier-purple);
    box-shadow: 0 0 0 3px rgba(55, 0, 60, 0.1);
}

.filter-select {
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--premier-purple);
}

/* ==========================================
   VIEW TOGGLE
   ========================================== */

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-white);
    padding: 0.5rem;
    border-radius: 50px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.toggle-btn {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.toggle-btn.active {
    background: var(--premier-purple);
    color: var(--text-white);
}

.toggle-btn:hover:not(.active) {
    background: var(--hover-bg);
}

/* ==========================================
   STATS CARDS
   ========================================== */

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

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--premier-purple);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ==========================================
   CLUB CARDS (GRID VIEW)
   ========================================== */

.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.club-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
}

.club-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.club-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--premier-purple);
}

.club-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.club-info {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    text-align: center;
}

.club-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.club-delete {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FEE2E2;
    border: none;
    color: #DC2626;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.club-delete:hover {
    background: #DC2626;
    color: white;
}

/* ==========================================
   TABLE VIEW
   ========================================== */

.table-container {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.equipos-table thead {
    background: var(--bg-light);
}

.equipos-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.equipos-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.equipos-table tbody tr {
    transition: background 0.2s;
}

.equipos-table tbody tr:hover {
    background: var(--hover-bg);
}

.club-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.club-cell-logo {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--premier-purple);
    flex-shrink: 0;
}

.club-cell-name {
    font-weight: 600;
    color: var(--text-dark);
}

.actions-cell {
    display: flex;
    gap: 0.75rem;
}

.loading-cell {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-gray);
}

/* ==========================================
   MODAL
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--premier-purple);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-form {
    padding: 2rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--premier-purple);
    box-shadow: 0 0 0 3px rgba(55, 0, 60, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   SPONSORS SECTION
   ========================================== */

.sponsors-section {
    background: var(--bg-light);
    padding: 3rem 0;
    margin-top: 4rem;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
}

.sponsor-card {
    background: var(--bg-white);
    padding: 2rem 1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.sponsor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sponsor-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--premier-purple);
    margin-bottom: 0.75rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
}

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

.footer {
    background: var(--bg-white);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

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

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--premier-purple);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 968px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .search-section {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
        min-width: auto;
    }

    .clubs-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .table-container {
        overflow-x: auto;
    }

    .equipos-table {
        min-width: 800px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .sponsors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

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

    .header-content {
        padding: 0 1rem;
    }

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

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

    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ==========================================
   UTILITIES
   ========================================== */

.hidden {
    display: none !important;
}

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

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}
