/* Estilos específicos para el panel de administración */

/* Login Body */
.login-body {
    min-height: 100vh;
    background-color: #0101ff;}

.login-body #login-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-logo {
    height: 200px;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: #0101ff;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

.login-form {
    text-align: left;
}

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

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #0101ff;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #0101ff;
}

.login-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.login-links {
    margin-top: 1rem;
    text-align: center;
}

.login-links a {
    color: #0101ff;
    text-decoration: none;
    font-size: 0.9rem;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.login-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Admin Panel */
.admin-panel {
    min-height: 100vh;
    background: #f8f9fa;
}

.admin-header {
    background: linear-gradient(135deg, #0101ff 0%, #0000cc 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-logo {
    width: 50px;
    height: 50px;
}

.admin-brand h1 {
    margin: 0;
    font-size: 1.5rem;
}

/* Navigation */
.admin-nav {
    background: white;
    padding: 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
}

.nav-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    border-bottom: 3px solid transparent;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: #f8f9fa;
    color: #0101ff;
}

.nav-btn.active {
    color: #0101ff;
    border-bottom-color: #0101ff;
    background: #f8f9fa;
}

/* Content */
.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Admin Forms */
.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-form h3 {
    color: #0101ff;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

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

.admin-form .form-group {
    margin-bottom: 1rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #0101ff;
    font-weight: 600;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: #0101ff;
}

.admin-form textarea {
    resize: vertical;
}

/* Admin Lists */
.admin-list {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.admin-list h3 {
    color: #0101ff;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.admin-list h4 {
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

/* List Items */
.list-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #0101ff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.list-item-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.list-item-description {
    color: #555;
    line-height: 1.5;
}

.list-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

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

.btn-delete:hover {
    background: #c82333;
}

/* Image Preview */
.image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
}

/* Equipos container para calendario */
.equipos-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.equipo-item {
    display: grid;
    grid-template-columns: 120px 150px 1fr 150px 50px;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.jornada-label {
    font-weight: 600;
    color: #0101ff;
    font-size: 0.9rem;
}

.equipo-item select,
.equipo-item input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
}

.rival-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    min-width: 200px;
}

.remove-equipo-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.remove-equipo-btn:hover {
    background: #c82333;
}

/* Estilos para la lista de equipos en jornadas */
.equipos-list {
    margin-top: 0.5rem;
}

.equipo-match {
    display: inline-block;
    background: #e9ecef;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    margin: 0.2rem 0.5rem 0.2rem 0;
    color: #495057;
}

/* Estilos para indicar cambio de posición en el formulario */
.equipo-style {
    background-color: #e3f2fd !important;
    border-color: #0101ff !important;
    font-weight: 600 !important;
}

.rival-style {
    background-color: #fff3e0 !important;
    border-color: #ff9800 !important;
    font-weight: 600 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        margin: 1rem;
        padding: 2rem;
    }
    
    .admin-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-nav {
        flex-direction: column;
        justify-content: center;
    }
    
    .equipo-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .equipo-item select,
    .equipo-item input {
        min-width: auto;
        width: 100%;
    }
    
    .equipo-item .condicion-select {
        flex: none;
        width: 100%;
    }
    
    .nav-btn {
        justify-content: center;
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .nav-btn.active {
        border-right-color: #0101ff;
        border-bottom-color: transparent;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .list-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .list-item-actions {
        justify-content: center;
    }
    
    .equipo-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .jornada-label {
        text-align: center;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .equipo-item select,
    .equipo-item input {
        width: 100%;
    }
    
    .remove-equipo-btn {
        align-self: center;
        width: 100%;
    }
    
    .jornadas-list {
        grid-template-columns: 1fr;
    }
}

/* Estilos para acciones de admin */
.admin-actions {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.admin-actions .btn {
    margin-right: 1rem;
}

/* Estilos para listado de calendarios */
.equipo-calendario-item {
    margin-bottom: 2rem;
}

.jornadas-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.jornada-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

.jornada-num {
    font-weight: 600;
    color: #0101ff;
    min-width: 30px;
}

.jornada-fecha {
    color: #666;
    min-width: 80px;
    font-size: 0.8rem;
}

.jornada-rival {
    flex: 1;
}
