:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --bg-light: #f8f9fa;
    --text-dark: #343a40;
    --border-color: #dee2e6;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 20px;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

/* --- Estilos del Formulario --- */
#form-patrocinador {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 30px;
    background-color: #ffffff;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-group input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

.form-actions {
    grid-column: 1 / -1; /* Ocupa ambas columnas */
    text-align: center;
}

.btn-submit {
    background-color: var(--success-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.btn-submit:hover {
    background-color: #1e7e34;
}

.btn-submit i {
    margin-right: 8px;
}

/* --- Estilos de la Lista --- */
h2 {
    margin-top: 40px;
    color: var(--text-dark);
    border-bottom: 1px dashed var(--secondary-color);
    padding-bottom: 10px;
}

#lista-patrocinadores {
    list-style: none;
    padding: 0;
}

#lista-patrocinadores li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

#lista-patrocinadores li:hover {
    background-color: #f1f1f1;
}

#lista-patrocinadores li:last-child {
    border-bottom: none;
}

.patrocinador-info {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.patrocinador-info strong {
    margin-right: 15px;
    color: var(--primary-color);
}

.patrocinador-actions {
    margin-left: 20px;
}

.btn-delete {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

.btn-delete:hover {
    background-color: #bd2130;
}

/* --- Mensajes de Estado --- */
.alert {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
    display: none; /* Se muestra con JS */
}
.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- Nuevo estilo para el logo de previsualización --- */
.logo-preview {
    width: 40px; /* Tamaño del logo */
    height: 40px;
    object-fit: contain; /* Asegura que el logo se vea bien sin distorsionarse */
    margin-right: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: white;
}
.no-logo-text {
    color: var(--secondary-color);
    margin-right: 15px;
    font-style: italic;
}


@media (max-width: 768px) {
    #form-patrocinador {
        grid-template-columns: 1fr;
    }
    .patrocinador-info {
        flex-direction: column;
        align-items: flex-start;
    }
    .patrocinador-info strong, .patrocinador-info span {
        margin-bottom: 5px;
    }
}